Chapter 16. Socket I/O
In this chapter we discuss the system calls that read and write data on a network connection. The chapter is divided into three parts.
The first part covers the four system calls for sending data:
write, writev, sendto, and
sendmsg. The second part covers the four system calls for receiving data:
read, readv, recvfrom, and
recvmsg. The third part of the chapter covers the
select system call, which provides a standard way to monitor the status of descriptors in general and sockets in particular.
The core of the socket layer is the
soreceive functions. They handle all I/O between the socket layer and the protocol layer. As we’ll see, the semantics of the various types of protocols overlap in these functions, ...