|
group2 0.1.0
CSE 125 Group 2
|
Classes | |
| class | FragmentReassembler |
| struct | PacketHeader |
| 16-byte header at the start of every UDP datagram we send. 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... | |
Enumerations | |
| enum class | PacketKind : uint8_t { Payload = 0 , ConnectionRequest = 1 , ConnectionAccepted = 2 , Disconnect = 3 , KeepAlive = 4 } |
| Packet kind discriminator (PacketHeader::kind field). More... | |
| enum class | ChannelId : uint8_t { Unreliable = 0 , UnreliableSequenced = 1 , ReliableOrdered = 2 , ReliableUnordered = 3 , Count = 4 } |
| Per-channel reliability + ordering semantics. More... | |
Variables | |
| constexpr uint16_t | k_protocolMagic = 0x3247 |
| Magic bytes identifying our protocol. ASCII "G2" little-endian. | |
| constexpr uint8_t | k_protocolVersion = 1 |
| Wire-format version. Bump on any layout change. | |
| constexpr int | k_maxPacketBytes = 1200 |
| Maximum total UDP payload (header + data) in bytes. | |
| constexpr int | k_maxPayloadBytes = k_maxPacketBytes - static_cast<int>(sizeof(PacketHeader)) |
| Maximum payload bytes a single (non-fragmented) datagram can carry. | |
|
strong |
Per-channel reliability + ordering semantics.
Stage 3d-1 ships only the enum; each channel's actual behaviour arrives with the packet types that use it.
|
strong |
Packet kind discriminator (PacketHeader::kind field).
|
inlineconstexpr |
Maximum total UDP payload (header + data) in bytes.
1200 is the safe MTU floor for the public Internet. Routers can fragment or drop bigger datagrams. Stage 3d-4 adds application-layer fragmentation for messages that exceed this.
|
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 layout change.