1 .TH READV 3 "January 6, 2010"
4 readv, writev \- vector-based IO
10 ssize_t readv(int \fIfildes\fP, const struct iovec *\fIiov\fP, int \fIiovcnt\fP);
11 ssize_t writev(int \fIfildes\fP, const struct iovec *\fIiov\fP, int \fIiovcnt\fP);
14 The \fBreadv\fP and \fBwritev\fP functions allow one to use multiple buffers
15 when reading from or writing to files. The \fIfildes\fP parameter specifies the
16 file descriptor as with the \fBread\fP and \fBwrite\fP functions. \fIiov\fP
17 specifies an array of buffers to be read into or written from. For each element
18 of this array, the iov_base member specifies the address of the buffer and
19 iov_len specifies its size in bytes. The number of buffers is specified by
20 \fIiovcnt\fP. At most IOV_MAX buffers may be specified and their total size may
21 not exceed SSIZE_MAX (both constants are defined in limits.h).
23 In case of success, the total number of bytes read or written is returned.
24 Zero may be returned if no buffers were specified or each buffer has size zero.
25 In the case of writev, a return value zero may also indicate an end of file
26 condition. If the functions fail, -1 is returned.