buffer_flush(3)
limb manual
buffer_flush(3)
NAME
buffer_flush - flush a writing I/O buffer
SYNOPSIS
#include <limb/buffer.h>
int buffer_flush(buffer *buf)
DESCRIPTION
The buffer_flush
() function will flush data in the internal memory of the
buffer pointed by buf
, to be written out into the file descriptor associated
with the buffer.
Warning
Note that a successful call to buffer_flush
() (i.e. with a return value
of 1) does not imply the buffer is now empty, as only some of its data
might have been written out.
If needing to be sure, one should check with buffer_isempty(3).
RETURN VALUE
The buffer_flush
() function returns 1 when at least some data have been
flushed/written out, else it returns 0 and sets errno
to indicate the error.
ERRORS
The buffer_flush
() function may fail for any of the error specified for its
operational function, as set via e.g. buffer_init(3).