Functions
build_h3_scope
6
dict[str, Any]
▼
Build an ASGI HTTP scope from HTTP/3 HeadersReceived.
Parses pseudo-headers (:…
build_h3_scope
6
dict[str, Any]
▼
def build_h3_scope(headers: list[tuple[bytes, bytes]], config: ServerConfig, client: tuple[str, int], server: tuple[str, int], *, stream_id: int = 0, is_0rtt: bool = False) -> dict[str, Any]
Build an ASGI HTTP scope from HTTP/3 HeadersReceived.
Parses pseudo-headers (:method, :path, :scheme, :authority) and builds the scope. HTTP/3 requires TLS, so scheme is always https.
Parameters
| Name | Type | Description |
|---|---|---|
headers |
list[tuple[bytes, bytes]] |
HTTP/3 header list from zoomies H3HeadersReceived. |
config |
ServerConfig |
Server configuration. |
client |
tuple[str, int] |
Client (host, port) from QUIC connection. |
server |
tuple[str, int] |
Server (host, port) tuple. |
stream_id |
int |
HTTP/3 stream ID (for extensions). Default:0
|
is_0rtt |
bool |
True if request arrived via 0-RTT (replay risk). Default:False
|
Returns
dict[str, Any]
create_h3_receive
1
Receive
▼
Create an ASGI receive callable for an HTTP/3 stream.
The protocol pushes body…
create_h3_receive
1
Receive
▼
def create_h3_receive(body_queue: asyncio.Queue[dict[str, Any]]) -> Receive
Create an ASGI receive callable for an HTTP/3 stream.
The protocol pushes body events into the queue as DataReceived arrives.
Parameters
| Name | Type | Description |
|---|---|---|
body_queue |
asyncio.Queue[dict[str, Any]] |
Returns
Receive
create_h3_send
8
Send
▼
Create an ASGI send callable for an HTTP/3 stream.
Serializes via zoomies H3Co…
create_h3_send
8
Send
▼
def create_h3_send(h3_conn: H3Connection, stream_id: int, transmit: Any, state: SendState, *, timing: ServerTiming | None = None, compressor: Compressor | None = None, request_method: str = 'GET', request_id: str | None = None) -> Send
Create an ASGI send callable for an HTTP/3 stream.
Serializes via zoomies H3Connection. After each send, call transmit() to flush QUIC packets to the wire.
Parameters
| Name | Type | Description |
|---|---|---|
h3_conn |
H3Connection |
|
stream_id |
int |
|
transmit |
Any |
|
state |
SendState |
|
timing |
ServerTiming | None |
Default:None
|
compressor |
Compressor | None |
Default:None
|
request_method |
str |
Default:'GET'
|
request_id |
str | None |
Default:None
|
Returns
Send