masque_server_connection (masque v0.7.0)
View SourcePer-H3-connection owner + router for MASQUE tunnels.
The listener's connection_handler` hook spawns one of these gen_servers per accepted H3 connection and hands its pid to `quic_h3 as the connection's owner. That makes it the single receiver of all owner-addressed events (datagrams, stream-data for non-claimed streams, etc.), which we then route to the per-tunnel session process keyed by StreamId.
Summary
Functions
Cancel a pending session that timed out.
Register SessionPid` as the owner of `StreamId`s datagrams.
Return the session module for the given args.
Start a session process and register it. The router spawns the session asynchronously so it stays responsive for datagram routing. The caller blocks until the session init completes.
Functions
-spec cancel_pending(pid(), non_neg_integer()) -> ok | {error, already_activated}.
Cancel a pending session that timed out.
-spec lookup_session(pid(), non_neg_integer()) -> {ok, pid()} | error.
-spec register_session(pid(), non_neg_integer(), pid()) -> ok.
Register SessionPid` as the owner of `StreamId`s datagrams.
Return the session module for the given args.
-spec start_link(non_neg_integer()) -> {ok, pid()} | ignore | {error, term()}.
Start a session process and register it. The router spawns the session asynchronously so it stays responsive for datagram routing. The caller blocks until the session init completes.
-spec unregister_session(pid(), non_neg_integer()) -> ok.