#define RX_BUF_SIZE
Ring-buffer capacity in bytes per connection slot.
#define MAX_CONNS
Maximum simultaneous TCP connections.
void http_parser_reset(HttpReq *req)
Reset a parser context to the initial (PARSE_METHOD) state.
void http_parser_feed(HttpReq *p, uint8_t byte)
Feed one byte to the parser state machine.
HttpReq http_pool[MAX_CONNS]
Pool of parser contexts, one per transport slot.
@ PARSE_COMPLETE
Full request parsed; ready for dispatch.
@ PARSE_URI_TOO_LONG
Path exceeds MAX_PATH_LEN → 414.
@ PARSE_ENTITY_TOO_LARGE
Content-Length > BODY_BUF_SIZE → 413.
@ PARSE_ERROR
Unrecoverable parse failure → 400.
void http_reset(uint8_t slot_id)
Reset the HTTP parser for a connection slot.
void http_parse(uint8_t slot_id)
Drain the transport ring buffer and advance the HTTP parser.
Layer 6 (Presentation) — wires the transport ring buffer to the HTTP parser.
Fully-parsed HTTP/1.1 request.
ParseState parse_state
Current parser state.
uint8_t slot_id
Transport slot index (set by presentation layer).
A single TCP connection context.
volatile size_t rx_tail
Consumer read index (main-loop context).
uint8_t rx_buffer[RX_BUF_SIZE]
Ring buffer storage.
volatile size_t rx_head
Producer write index (lwIP context).
TcpConn conn_pool[MAX_CONNS]
Static pool of connection contexts. Defined in transport.cpp.