|
KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
|
#include <file_io.h>
Data Fields | |
| int(* | submit )(KlFileIO *fio, int file_fd, void *buf, size_t len, off_t offset, int sock_fd, void *udata) |
| int(* | cancel )(KlFileIO *fio, int sock_fd) |
| int(* | tick )(KlFileIO *fio, KlFileIOResult *out, int max) |
| void(* | destroy )(KlFileIO *fio) |
| int(* KlFileIO::submit) (KlFileIO *fio, int file_fd, void *buf, size_t len, off_t offset, int sock_fd, void *udata) |
Submit an async file read into buf. sock_fd is an opaque key for routing/cancellation. Returns 0 on success, -1 on error.
| int(* KlFileIO::cancel) (KlFileIO *fio, int sock_fd) |
Cancel pending read keyed by sock_fd. Best-effort.
| int(* KlFileIO::tick) (KlFileIO *fio, KlFileIOResult *out, int max) |
Collect completions since last tick. Called once per event loop iteration. Returns count.
| void(* KlFileIO::destroy) (KlFileIO *fio) |
Free backend resources.