Skip to main content Module connection Copy item path Source MuxConnection π QUIC path: one stream per protocol, each with its own writer task.
send_queues and recv_queues are keyed by protocol id. MuxStream π One QUIC protocol streamβs halves, returned from setup_quic_streams. SingleConnection π TCP / TLS path: one shared writer drains send_queue; a single
reader demuxes incoming PeerNetMsgs into the matching recv_queues. RECV_QUEUE_SIZE π SEND_QUEUE_SIZE π PeerConnection π Per-peer wire abstraction. Hides single-pipe (TCP/TLS) vs.
stream-mux (QUIC) framing from the layers above. broadcast_shutdown π Push ProtocolEvent::Shutdown into every recv queue, waking
blocked recv callers. build_recv_queues π One bounded recv queue per protocol id. from_queued π Build the right PeerConnection for the post-handshake QueuedConn.
Picks MuxConnection when QUIC is in use, SingleConnection otherwise. setup_quic_streams π Open / accept one QUIC stream per negotiated protocol and return
the per-stream send queues plus the reader/writer halves. spawn_demux_reader π Spawn the single-pipe reader task. Reads PeerNetMsgs, routes
Protocol payloads into the matching recv queue, signals the peer
via stop_chan on Shutdown / error. spawn_quic_reader π Spawn a per-stream QUIC reader task. The stream is already keyed
by protocol id, so messages go straight into recv_queue. spawn_writer_task π Spawn a task that drains queue into writer. Exits when the
writer fails (peer hung up).