buffer_flush - Man Page
feed buffer to write function
Syntax
#include <buffer.h>
int buffer_flush(buffer* b);
Description
buffer_flush feeds a string d[0], d[1], ..., d[dlen-1] to the write operation by calling
op(fd,d,dlen)
If op successfully handles one or more bytes at the beginning of the string, it must return the number of bytes handled; if this number is smaller than dlen, buffer_flush will call op again with the rest of the string. If op does not handle any bytes, and does not encounter an error, it must return 0, or return -1 with errno set to EINTR; in either case, buffer_flush will immediately call op again. If op encounters an error, it must return -1 with errno set to something other than EINTR; buffer_flush will pass the error to the caller.
On success, buffer_flush returns 0. On error, buffer_flush returns -1, setting errno appropriately.
See Also
Referenced By
buffer(3), buffer_init(3), buffer_mmapread(3), buffer_put(3), buffer_put8long(3), buffer_putalign(3), buffer_puterror(3), buffer_puterror2(3), buffer_putflush(3), buffer_putlong(3), buffer_putlonglong(3), buffer_putm(3), buffer_putnlflush(3), buffer_puts(3), buffer_putsa(3), buffer_putsaflush(3), buffer_putsalign(3), buffer_putsflush(3), buffer_putspace(3), buffer_putulong(3), buffer_putulonglong(3), buffer_putxlong(3).