Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
readv(3)
Edit
PageHistory
Diff
Info
LikePages
READV !!!READV NAME SYNOPSIS DESCRIPTION RETURN VALUE ERRORS CONFORMING TO BUGS SEE ALSO ---- !!NAME readv, writev - read or write data into multiple buffers !!SYNOPSIS __#include __ ''filedes''__, const struct iovec *__''vector''__, size_t__ ''count''__); int writev(int__ ''filedes''__, const struct iovec *__''vector''__, size_t__ ''count''__); __ !!DESCRIPTION The __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 ____ as struct iovec { void *iov_base; /* 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 read(2) except that multiple buffers are filled. The __writev()__ function works just like write(2) except that multiple buffers are written out. !!RETURN VALUE The __readv()__ function returns the number of bytes or -1 on error; the __writev()__ function returns the number of bytes written. !!ERRORS The __readv()__ and __writev()__ functions can fail and set ''errno'' to the following values: __EBADF__ ''fd'' is not a valid file descriptor. __EINVAL__ ''fd'' is unsuitable for reading (for __readv()__) or writing (for __writev()__). __EFAULT__ ''buf'' is outside the processes' address space. __EAGAIN__ Non-blocking I/O had been selected in the __open()__ call, and reading or writing could not be done immediately. __EINTR__ Reading or writing was interrupted before any data was transferred. !!CONFORMING TO unknown !!BUGS It 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 read(2), write(2) ----
One page links to
readv(3)
:
Man3r
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.