READVSection: Linux Programmer's Manual (2)
Return to Main Contents
NAMEreadv, writev - read or write a vector
int readv(int fd, const struct iovec * vector, int count);
int writev(int fd, const struct iovec * vector, int count);
DESCRIPTIONreadv reads data from file descriptor fd, and puts the result in the buffers described by vector. The number of buffers is specified by count. The buffers are filled in the order specified. Operates just like read except that data is put in vector instead of a contiguous buffer.
writev writes data to file descriptor fd, and from the buffers described by vector. The number of buffers is specified by count. The buffers are used in the order specified. Operates just like write except that data is taken from vector instead of a contiguous buffer.
RETURN VALUEOn success readv returns the number of bytes read. On success writev returns the number of bytes written. On error, -1 is returned, and errno is set appropriately.
CONFORMING TO4.4BSD (the readv and writev functions first appeared in BSD 4.2), Unix98. Linux libc5 uses size_t as the type of the count parameter, which is logical but non-standard.
SEE ALSOread(2), write(2), fprintf(3), fscanf(3)
This document was created by man2html, using the manual pages.
Time: 15:08:50 GMT, July 17, 2018