O'Reilly logo

Java™ Network Programming and Distributed Computing by Michael Reilly, David Reilly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.1. Overview

The User Datagram Protocol (UDP) is a commonly used transport protocol employed by many types of applications. UDP is a connectionless transport protocol, meaning that it doesn't guarantee either packet delivery or that packets arrive in sequential order. Rather than reading from, and writing to, an ordered sequence of bytes (using I/O streams, as discussed in Chapter 4), bytes of data are grouped together in discrete packets, which are sent over the network. Although control over the ultimate destination of a UDP packet rests with the computer that sends it, how it reaches that destination is an arbitrary process (see Figure 5-1).

Figure 5-1. UDP packet transport over a network can be unreliable.

The packets may travel along different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required