|
group2 0.1.0
CSE 125 Group 2
|
Namespaces | |
| namespace | chat |
| namespace | crypto |
| namespace | discovery |
| namespace | shotdebug |
| namespace | voice |
Classes | |
| struct | RelayToken |
| class | FragmentReassembler |
| struct | PacketHeader |
| 36-byte header at the start of every UDP datagram. More... | |
| struct | UdpEndpointAddr |
| A UDP datagram address (server's view of a remote peer). More... | |
| struct | UdpReceivedMessage |
| One framed UDP message ready to dispatch to upper layers. More... | |
| class | UdpEndpoint |
| Wraps a NET_DatagramSocket with header-prefixed I/O. More... | |
| class | UdpSessionTransport |
Enumerations | |
| enum class | PacketKind : std::uint8_t { Payload = 0 , ConnectionRequest = 1 , ConnectionAccepted = 2 , Disconnect = 3 , KeepAlive = 4 , RelayPayload = 5 , DirectoryControl = 6 } |
| Packet kind discriminator (PacketHeader::kind field). More... | |
| enum class | ChannelId : std::uint8_t { InputUnreliable = 0 , SnapshotUnreliableSequenced = 1 , ControlReliableOrdered = 2 , EventReliableOrdered = 3 , VoiceUnreliableSequenced = 4 , Count = 5 , Unreliable = InputUnreliable , UnreliableSequenced = SnapshotUnreliableSequenced , ReliableOrdered = EventReliableOrdered , ReliableUnordered = ControlReliableOrdered } |
| Per-channel reliability + ordering semantics. More... | |
Functions | |
| bool | hasRelayToken (const RelayToken &token) |
| void | writeU16Le (std::uint8_t *out, std::uint16_t v) |
| void | writeU32Le (std::uint8_t *out, std::uint32_t v) |
| void | writeU64Le (std::uint8_t *out, std::uint64_t v) |
| std::uint16_t | readU16Le (const std::uint8_t *in) |
| std::uint32_t | readU32Le (const std::uint8_t *in) |
| std::uint64_t | readU64Le (const std::uint8_t *in) |
| void | encodePacketHeader (const PacketHeader &hdr, std::uint8_t *out) |
| bool | decodePacketHeader (const std::uint8_t *data, std::size_t len, PacketHeader &out) |
| std::vector< std::uint8_t > | makeDatagram (PacketHeader hdr, const void *payload, int payloadLen) |
Variables | |
| constexpr std::size_t | k_relayTokenMacBytes = 32 |
| constexpr std::uint16_t | k_protocolMagic = 0x3247 |
| Magic bytes identifying our protocol. ASCII "G2" little-endian. | |
| constexpr std::uint8_t | k_protocolVersion = 2 |
| Wire-format version. Bump on any incompatible layout change. | |
| constexpr int | k_maxPacketBytes = 1200 |
| Maximum total UDP datagram bytes we intentionally emit. | |
| constexpr std::uint8_t | k_flagFragmented = 0x01 |
| constexpr std::uint8_t | k_flagEncrypted = 0x02 |
| constexpr std::uint8_t | k_flagRelayPreferred = 0x04 |
| constexpr int | k_maxPayloadBytes = k_maxPacketBytes - static_cast<int>(sizeof(PacketHeader)) |
| Maximum payload bytes a single non-fragmented datagram can carry. | |
|
strong |
|
strong |
Packet kind discriminator (PacketHeader::kind field).
| Enumerator | |
|---|---|
| Payload | |
| ConnectionRequest | |
| ConnectionAccepted | |
| Disconnect | |
| KeepAlive | |
| RelayPayload | |
| DirectoryControl | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Maximum total UDP datagram bytes we intentionally emit.
1200 bytes is the safe MTU floor for public Internet paths. Larger logical messages are fragmented above UDP by the transport layer.
|
inlineconstexpr |
Maximum payload bytes a single non-fragmented datagram can carry.
|
inlineconstexpr |
Magic bytes identifying our protocol. ASCII "G2" little-endian.
|
inlineconstexpr |
Wire-format version. Bump on any incompatible layout change.
|
inlineconstexpr |