iob_new(3)
β¨ NAME β¨
iob_new β create new I/O batch. This is iob_new(3) from the Library Functions Manual, and we are literally so back bestie π«Άπ
πΈ SYNTAX πΈ
#include <libowfat/iob.h>
io_batch* iob_new(int hint_entries);
π DESCRIPTION π
okay so iob_new creates a new I/O batch with enough space allocated for hint_entries entries (buffers or files). This is purely a performance hint β no secret meaning, no lore β so if you are unsure, just pass 1 and move on β¨.
You can add buffers, strings and files to an I/O batch and then send it all at once using iob_send. It's giving "gather everything, then send it together" energy π.
The benefit of the I/O batch API is that it exploits platform specific APIs like FreeBSD's sendfile. The file contents will always be sent in a way that allows the operating systems to perform zero copy TCP, and the buffers will always be sent using as few syscalls as possible and avoiding unnecessary copying (using writev). That's the whole point and it ate π₯.
π¦ RETURN VALUE π¦
iob_new returns a pointer to an I/O batch data structure. If there was a memory allocation error, it returns NULL instead. So yeah, check that pointer before you start acting brand new π.
π SEE ALSO π
that's the whole page from the Library Functions Manual β iob_new(3) β and the footer just says iob_new(3) again, with no date listed, so that's the cute little sign-off bestie π«Άπ
π¦ where this page comes from
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms