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

Bridge between the HTTP/2 engine (h2_conn) and the server's request pipeline. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

Bridge between the HTTP/2 engine (h2_conn) and the server's request pipeline.

When a TLS connection negotiates ALPN "h2", the session layer hands its decrypted bytes to this module instead of the HTTP/1.1 parser. It runs one h2_conn per connection slot, maps each decoded request's pseudo-headers (:method / :path / :authority) and headers into the slot's HttpReq, and marks it ParseState::PARSE_COMPLETE so the existing route dispatcher serves it. Responses from the handlers route back here (DetWebServer::send branches on the slot's h2 flag) and are serialized as HEADERS + DATA frames, leaving the connection open for the next stream.

The per-slot engines are large (a whole frame is buffered), so their pool lives in PSRAM where available; HTTP/2 is therefore practical on PSRAM boards (ESP32-S3/-P4, WROVER).

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file h2_server.h.