Exercises

  1. Change the chatter programs to use datagrams. The messages are small enough to fit into a single datagram. Given the quality of discussion in most chat rooms, a lost packet here or there is probably not too much of an issue. Since the messages fit into packet boundaries and since recvfrom() will not coalesce packets like socket streams, this should simplify a lot of the code.

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.