|
group2 0.1.0
CSE 125 Group 2
|
Phase 3d: per-feature toggles for the UDP transport rollout. More...
#include <NetworkConfig.hpp>
Public Attributes | |
| bool | enableUdpSidecar = true |
| Stage 3d-1: bind a UDP datagram socket alongside the TCP socket. | |
| bool | inputsOverUdp = true |
| Stage 3d-2: send INPUT packets over UDP instead of TCP. | |
| bool | pingOverUdp = true |
| Stage 3d-3: send PING (client→server) and PONG (server→client) over UDP for accurate RTT measurement that can't be poisoned by snapshot-stream backlog. | |
| bool | snapshotsOverUdp = true |
| Stage 3d-4: route UPDATE_REGISTRY snapshots over UDP instead of TCP. | |
| bool | eventsOverUdp = true |
| Stage 3d-5: route KILL_EVENT, PARTICLE_SPAWN, and MATCH_STATE through a reliable-style UDP channel instead of TCP. | |
Phase 3d: per-feature toggles for the UDP transport rollout.
The transport overhaul is staged across multiple sub-phases (3d-1 through 3d-5), each gated by one of these flags. Defaults are conservative — features turn on only after they've been verified stable for at least one release.
| bool TransportConfig::enableUdpSidecar = true |
Stage 3d-1: bind a UDP datagram socket alongside the TCP socket.
Currently no traffic flows through it; later stages move individual packet types over. Cheap to enable (one socket bind); off by default until 3d-2 actually uses it.
| bool TransportConfig::eventsOverUdp = true |
Stage 3d-5: route KILL_EVENT, PARTICLE_SPAWN, and MATCH_STATE through a reliable-style UDP channel instead of TCP.
Each event is shipped multiple times across consecutive network cycles for redundancy; client dedups by per-channel sequence number using a 64-entry sliding-window bitset. Drops disappear into the next redundant send.
| bool TransportConfig::inputsOverUdp = true |
Stage 3d-2: send INPUT packets over UDP instead of TCP.
Inputs already carry 5-tick redundancy so single-packet loss is tolerated by design.
| bool TransportConfig::pingOverUdp = true |
Stage 3d-3: send PING (client→server) and PONG (server→client) over UDP for accurate RTT measurement that can't be poisoned by snapshot-stream backlog.
| bool TransportConfig::snapshotsOverUdp = true |
Stage 3d-4: route UPDATE_REGISTRY snapshots over UDP instead of TCP.
The server fragments oversize snapshots into MTU-safe datagrams; the client reassembles via FragmentReassembler. Drop-stale: a single dropped fragment loses the snapshot but the next one (~31 ms later at 32 Hz) arrives independently. Off until 3d-4 is verified — defaulting off lets the rollout be config-driven.