Chapter 7 Under the Hood

Some of the subtleties of network programming are difficult to grasp without some understanding of the data structures associated with each socket in the implementation and certain details of how the underlying protocols work. This is especially true of stream (TCP) sockets. This chapter describes some of what goes on “under the hood” when you create and use a socket. The initial discussion and Section 7.5 apply to both datagram (UDP) and stream (TCP) sockets; the rest applies only to TCP sockets. Please note that this description covers only the normal sequence of events and glosses over many details. Nevertheless, we believe that even this basic level of understanding is helpful. Readers who want the full story are ...

Get TCP/IP Sockets in C, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.