|
KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
|
Composable event loop context. More...
#include <event_ctx.h>

Data Fields | |
| KlEventLoop | loop |
| KlAllocator * | alloc |
| KlWatcher * | watchers |
| int | dispatch_dirty |
| KlError | last_error |
| KlTimerEntry * | timers |
| int | timer_count |
| int | timer_cap |
| int64_t | timer_next_id |
Composable event loop context.
Contains the platform event loop, allocator, and watcher list. Embedded in KlServer via composition. Can also be used standalone (e.g. by KlClient, KlThreadPool) without requiring a full server.
| KlEventLoop KlEventCtx::loop |
Platform event loop
| KlAllocator* KlEventCtx::alloc |
borrowed — must outlive ctx
| KlWatcher* KlEventCtx::watchers |
Head of ctx-owned watcher list
| int KlEventCtx::dispatch_dirty |
set by kl_watcher_mod/del during callback
| KlError KlEventCtx::last_error |
diagnostic: set at point of return -1
| KlTimerEntry* KlEventCtx::timers |
min-heap array (NULL until first add)
| int KlEventCtx::timer_count |
entries in heap
| int KlEventCtx::timer_cap |
allocated slots
| int64_t KlEventCtx::timer_next_id |
monotonic ID counter