io_wrapper_read
Last updated March 2020
Name
io_wrapper_read — Read the specified number of bytes
Synopsis
#include "io_wrapper.h"
| int **io_wrapper_read** (
| io, | |
| | buf, | |
| | nbytes)
; | |
io_object * <var class="pdparam">io</var>
;
void * <var class="pdparam">buf</var>
;
int <var class="pdparam">nbytes</var>
;
Description
Read the specified number of bytes into the buffer. This function behaves like the system function read(2)
.
- io
-
The resource.
- buf
-
The buffer to read into.
- nbytes
-
The number of bytes to read.
On success, this function returns the number of bytes read and the file position is advanced by this number. On failure, it returns -1
and sets errno
appropriately to a system error defined by read(2)
.
It is legal to call this function in any thread.
See Also
Was this page helpful?