1iob_new(3)                 Library Functions Manual                 iob_new(3)
2
3
4

NAME

6       iob_new - create new I/O batch
7

SYNTAX

9       #include <iob.h>
10
11       io_batch* iob_new(int hint_entries);
12

DESCRIPTION

14       iob_new  creates  a  new  I/O  batch  with  enough  space allocated for
15       hint_entries entries (buffers or files).  This is purely a  performance
16       hint, if you are unsure just pass 1.
17
18       You can add buffers, strings and files to an I/O batch and then send it
19       all at once using iob_send.
20
21       The benefit of the I/O batch API is that it exploits platform  specific
22       APIs like FreeBSD's sendfile.  The file contents will always be sent in
23       a way that allows the operating systems to perform zero copy  TCP,  and
24       the  buffers  will always be sent using as few syscalls as possible and
25       avoiding unnecessary copying (using writev).
26

RETURN VALUE

28       iob_new returns a pointer to an I/O batch data structure.  If there was
29       a memory allocation error, it returns NULL instead.
30

SEE ALSO

32       iob_reset(3),     iob_send(3),     iob_addbuf(3),     iob_adds_free(3),
33       iob_addfile(3)
34
35
36
37                                                                    iob_new(3)
Impressum