| Red Hat Documentation: man pages: man3: Linux Programmer's Manual (3) |
READVSection: Linux Programmer's Manual (3)Updated: April 25, 2025 Index NAMEreadv, writev - read or write data into multiple buffersSYNOPSIS
#include <sys/uio.h>
int readv(int filedes, const struct iovec *vector,
size_t count);
int writev(int filedes, const struct iovec *vector,
size_t count);
DESCRIPTIONThe readv() function reads count blocks from the file associated with the file descriptor filedes into the multiple buffers described by vector.The writev() function writes at most count blocks described by vector to the file associated with the file descriptor filedes. The pointer vector points to a struct iovec defined in <sys/uio.h> as
struct iovect
{
void *iovbase; /* Starting address */
size_t iov_len; /* Number of bytes */
} ;
Buffers are processed in the order vector[0], vector[1], ... vector[count]. The readv() function works just like except that multiple buffers are filled. The writev() function works just like except that multiple buffers are written out. RETURN VALUESThe readv() function returns the number of bytes or -1 on error; the writev() function returns the number of bytes written.ERRORSThe readv() and writev() functions can fail and set errno to the following values:
CONFORMING TOunknownBUGSIt is not advisable to mix calls to functions like readv() or writev(), which operate on file descriptors, with the functions from the stdio library; the results will be undefined and probably not what you want.SEE ALSO
IndexThis document was created by using the manual pages. Time: 11:58:07 GMT, March 24, 2025 |
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |