Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

24.8. Datagrams

The connections we've talked about up to now have all been stream connections. However, just as in J2SE, UDP is a notable exception. UDP, whether implemented through standard I/O or the Generic Connection Framework, just isn't suited to a stream metaphor. In GCF, UDP is handled through the DatagramConnection and Datagram classes. These take the place of DatagramSocket and DatagramPacket in J2SE. Like the socket protocol, support for UDP and the datagram protocol is optional. Some devices support it; some don't.

24.8.1. Datagram URLs

Datagram URLs take two forms. Client URLs for sending data look like this:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial