O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

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

For the More Curious: Datagrams

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

TCP versus UDP

To create a datagram socket ...

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