msrt-udp
Tokio UDP adapters for MSRT.
This crate wraps MSRT endpoints around tokio::net::UdpSocket.
UdpClient: connected UDP client usingClientEndpointUdpServer<N>: fixed-capacity UDP server usingServerEndpoint<SocketAddr, N>
The server accepts unknown peers automatically until its fixed peer table is full.
Connected UDP sockets may surface recoverable transport feedback when a remote
peer disappears or restarts. UdpClient::tick reports these conditions as
UdpClientEvent::TransportUnavailable so clients can disconnect, back off, and
start a fresh MSRT session instead of treating the condition as fatal.
Client
use ;
# async
Server
use ;
# async
Examples
Run the server:
Run the frontend in another terminal:
To test reconnect behavior, stop the server while the frontend is running. The
frontend will report either TransportUnavailable from UDP socket feedback or
SendFailed from MSRT retry exhaustion. Start the server again and the frontend
will create a fresh MSRT session and continue sending.