|
KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
|
Built-in buffer reader — accumulates body into a growable buffer. More...
#include <body_reader.h>

Data Fields | |
| KlBodyReader | base |
| KlAllocator * | alloc |
| char * | data |
| size_t | len |
| size_t | cap |
| size_t | max_size |
Built-in buffer reader — accumulates body into a growable buffer.
Pass max_size as user_data via cast: (void *)(size_t)max_size. Pass NULL (0) for unlimited. Exceeding max_size returns -1 from on_data, which aborts the parse and sends 413.
| KlBodyReader KlBufReader::base |
Base body reader vtable
| KlAllocator* KlBufReader::alloc |
Allocator for buffer growth
| char* KlBufReader::data |
Accumulated body data
| size_t KlBufReader::len |
Current data length
| size_t KlBufReader::cap |
Buffer capacity
| size_t KlBufReader::max_size |
0 = unlimited