Module

h3_worker

HTTP/3 worker — runs QUIC/UDP datagram endpoint for HTTP/3.

Uses asyncio.create_datagram_endpoint with a pre-bound UDP socket. Shares app, config, lifecycle with the TCP Worker model but serves HTTP/3 over QUIC instead of HTTP/1.1 and HTTP/2 over TCP.

Requires theh3 optional dependency (pip install pounce[h3]).

Classes

H3Worker 5
Single-threaded async worker that serves HTTP/3 over QUIC/UDP. Uses create_datagram_endpoint with …

Single-threaded async worker that serves HTTP/3 over QUIC/UDP.

Uses create_datagram_endpoint with a pre-bound UDP socket. Zoomies provides sans-I/O QUIC; pounce owns the UDP loop and connection state.

Methods

run 0
Start the H3 worker's event loop (blocking).
def run(self) -> None
shutdown 0
Signal the worker to stop.
def shutdown(self) -> None
Internal Methods 3
__init__ 7
def __init__(self, config: ServerConfig, app: ASGIApp, sock: socket.socket, *, worker_id: int = 0, shutdown_event: threading.Event | None = None, ssl_certfile: str, ssl_keyfile: str) -> None
Parameters
Name Type Description
config
app
sock
worker_id Default:0
shutdown_event Default:None
ssl_certfile
ssl_keyfile
_serve 0
Run the QUIC datagram endpoint until shutdown.
async
async def _serve(self) -> None
_bridge_shutdown 1
Poll external shutdown event and set async shutdown.
async
async def _bridge_shutdown(self, ext_event: threading.Event) -> None
Parameters
Name Type Description
ext_event