Expand description
This module implements the send/recv relaying protocol.
Protocol flow:
- server occasionally sends
FrameType::Ping - client responds to any
FrameType::Pingwith aFrameType::Pong - clients sends
FrameType::ClientToRelayDatagramorFrameType::ClientToRelayDatagramBatch - server then sends
FrameType::RelayToClientDatagramorFrameType::RelayToClientDatagramBatchto recipient - server sends
FrameType::EndpointGonewhen the other client disconnects
Structs§
- Datagrams
- One or multiple datagrams being transferred via the relay.
Enums§
- Client
ToRelay Msg - Messages that clients send to relays.
- Error
- Protocol send errors.
- Relay
ToClient Msg - The messages that a relay sends to clients or the clients receive from the relay.
Constants§
- MAX_
PACKET_ SIZE - The maximum size of a packet sent over relay. (This only includes the data bytes visible to the socket, not including its on-wire framing overhead)