August 2011
Intermediate to advanced
552 pages
23h 48m
English
What we’ve been talking about in this chapter are “stream sockets.” They are a connection-oriented, reliable form of network communication. Berkeley sockets also support “datagram sockets.” These are a message-oriented, unreliable form of network communication. They are unreliable in the sense that datagrams may be lost in transit and that the receiver might not get the datagrams in the same order in which they were sent. The data in the payload is checksummed, so it will be correct. Stream sockets use the TCP protocol, and datagram sockets use the UDP protocol.
Figure 14.3 TCP versus UDP

To create a datagram socket ...
Read now
Unlock full access