61SOCKETS: ADVANCED TOPICS
This chapter considers a range of more advanced topics relating to sockets programming, including the following:
• the circumstances in which partial reads and writes can occur on stream sockets;
• the use of shutdown() to close one half of the bidirectional channel between two connected sockets;
• the recv() and send() I/O system calls, which provide socket-specific functionality not available with read() and write();
• the sendfile() system call, which is used in certain circumstances to efficiently output data on a socket;
• details of the operation of the TCP protocol, with the aim of eliminating some common misunderstandings that lead to mistakes when writing programs that use TCP sockets;
• the use of the netstat ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access