iob_addbuf(3) add buffer to I/O batch

SYNTAX

#include <iob.h>

int iob_addbuf(io_batch* b,const void* buf,uint64 n);

DESCRIPTION

iob_addbuf schedules n bytes starting at buf to be written with the I/O batch b.

Use iob_addbuf_free if you want the buffer to be deallocated automatically by iob_reset.

RETURN VALUE

Returns 1 on success, 0 on failure.