Data Structures | |
struct | iobuf |
The base I/O buffer structure. More... | |
Status Flags | |
#define | IOBUF_EOF 1 |
#define | IOBUF_ERROR 2 |
#define | IOBUF_TIMEOUT 4 |
#define | IOBUF_BADFLAGS 0xf |
#define | IOBUF_SEEKABLE 0x10 |
#define | IOBUF_NEEDSCLOSE 0x20 |
#define | IOBUF_NEEDSFREE 0x40 |
#define | IOBUF_NEEDSMUNMAP 0x80 |
unsigned | iobuf_bufsize |
Common | |
#define | IOBUF_SET_ERROR(io) |
#define | iobuf_closed(io) ((io)->fd == -1) |
#define | iobuf_error(io) ((io)->flags & IOBUF_ERROR) |
#define | iobuf_timedout(io) ((io)->flags & IOBUF_TIMEOUT) |
#define | iobuf_bad(io) ((io)->flags & IOBUF_BADFLAGS) |
typedef iobuf | iobuf |
int | iobuf_init (iobuf *io, int fd, unsigned bufsize, char *buffer, unsigned flags) |
int | iobuf_close (iobuf *io) |
int | iobuf_timeout (iobuf *io, int poll_out) |
Functions | |
int | iobuf_copy (ibuf *in, obuf *out) |
int | iobuf_copyflush (ibuf *in, obuf *out) |
int | ibuf_copytofd (ibuf *in, int out) |
int | obuf_copyfromfd (int in, obuf *out) |
0
(false) otherwise.
|
True if the
|
|
Mask of all the error type flags.
|
|
True if the
|
|
Reading reached end of file.
|
|
True if the
|
|
The iobuf has encountered an error.
|
|
The file descriptor needs to be closed.
|
|
The buffer needs to be deallocated with
|
|
The buffer needs to be deallocated with
|
|
|
|
Value: do{ \ io->flags |= IOBUF_ERROR; \ io->errnum = errno; \ return 0; \ }while(0) errno , and return false.
|
|
True if the input or output to the
|
|
The timeout expired before the read or write could be completed.
|
|
Copy all the data from an
|
|
Close an
|
|
Copy all the data from an
|
|
Copy all the data from an
|
|
Initialize an
|
|
Wait for a file descriptor to be ready for reading or writing.
|
|
Copy all the data from an
|
|
The default iobuf buffer size, defaults to 8192.
|