Skip to main content

Module transport

Module transport 

Source
Expand description

Reliable UDP transport layer.

Builds reliable, ordered delivery on top of raw UDP without any async runtime. Drive the stack each frame by calling ConnectionManager::poll().

§Architecture

 Application
     │  send(channel, data)
     ▼
 ConnectionManager  ──  maintains one Connection per peer
     │
     ▼
 Connection  ──  per-channel send queues + ReliableUdp
     │
     ▼
 NonBlockingSocket  ──  wraps std::net::UdpSocket

Structs§

ConnectionManager
Manages multiple UDP peer connections over a single local socket.
Fragmenter
Splits large payloads into MTU-safe fragments and reassembles on the receiver side.
NonBlockingSocket
Non-blocking UDP socket wrapper with poll-based receive.
ReceivedPacket
A packet received from a specific peer, ready for the application layer.
ReliableUdp
Reliable ordered UDP transport for a single peer connection.
TransportStats
Snapshot of transport-layer statistics for a single peer connection.

Enums§

Channel
Delivery channel semantics for outgoing data.
ConnectionState
Lifecycle state of a single UDP connection to a remote peer.

Constants§

ACK_WINDOW
Number of sequence numbers in the ack window.
FRAGMENT_TIMEOUT_MS
Fragment timeout in milliseconds (drop partial reassembly).
JITTER_ALPHA
EWMA smoothing factor for jitter.
KEEPALIVE_MS
Keepalive interval in milliseconds.
MAX_RETRANSMIT
Maximum number of retransmit attempts before giving up.
MTU
Maximum Transmission Unit for outgoing packets (bytes).
PEER_TIMEOUT_MS
Peer timeout after last received packet (ms).
RETRANSMIT_BASE_MS
Base retransmit timeout in milliseconds.
RETRANSMIT_MAX_MS
Maximum retransmit timeout after backoff (ms).
RTT_ALPHA
EWMA smoothing factor for RTT estimation.