DeterministicESPAsyncWebServer 1.2.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
presentation.h File Reference

Layer 6 (Presentation) — wires the transport ring buffer to the HTTP parser. More...

#include "http_parser.h"
#include "transport.h"

Go to the source code of this file.

Functions

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.
 

Detailed Description

Layer 6 (Presentation) — wires the transport ring buffer to the HTTP parser.

This layer owns two responsibilities:

  1. Drain bytes from conn_pool[slot_id].rx_buffer (transport ring buffer) and feed them into the HTTP parser one at a time.
  2. Expose slot-indexed http_reset() and http_parse() helpers that the session layer (server_tick) and application layer (handle) call by slot ID.

The actual HTTP parsing logic lives in http_parser.h / http_parser.cpp. This file merely includes it so callers only need one include.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file presentation.h.

Function Documentation

◆ http_reset()

void http_reset ( uint8_t  slot_id)

Reset the HTTP parser for a connection slot.

Delegates to http_parser_reset(&http_pool[slot_id]). Silently ignores out-of-range slot IDs.

Parameters
slot_idIndex into conn_pool / http_pool (0 … MAX_CONNS-1).

Definition at line 21 of file presentation.cpp.

◆ http_parse()

void http_parse ( uint8_t  slot_id)

Drain the transport ring buffer and advance the HTTP parser.

Reads all available bytes from conn_pool[slot_id].rx_buffer and feeds each byte to http_parser_feed(). Stops early if the parser reaches a terminal state (PARSE_COMPLETE, PARSE_ERROR, PARSE_ENTITY_TOO_LARGE, PARSE_URI_TOO_LONG).

Silently ignores out-of-range slot IDs.

Parameters
slot_idConnection slot to parse.

Definition at line 29 of file presentation.cpp.