Chapter 14. Advanced I/O Functions

Introduction

This chapter covers a variety of functions and techniques that we lump into the category of “advanced I/O.” First is setting a timeout on an I/O operation, which can be done in three different ways. Next are three more variations on the read and write functions: recv and send, which allow a fourth argument that contains flags from the process to the kernel, readv and writev, which let us specify a vector of buffers to input into or output from, and recvmsg and sendmsg, which combine all the features from the other I/O functions along with the new capability of receiving and sending ancillary data.

We also consider how to determine the amount of data in the socket receive buffer, how to use the C standard ...

Get The Sockets Networking API: UNIX® Network Programming Volume 1, Third Edition 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.