|
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 | useUdpSessions = true |
| UDP-first session transport. | |
| bool | allowLegacyTcpFallback = true |
| Temporary staged-cutover fallback. | |
| bool | forceRelay = false |
| Prefer the relay route even when direct is available. | |
| bool | noRelay = true |
| Disable directory relay routing for gameplay sessions. | |
| 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::allowLegacyTcpFallback = true |
Temporary staged-cutover fallback.
When true, the legacy TCP+UDP-sidecar path can still be selected by setting useUdpSessions=false. Kept only until UDP sessions are battle tested.
| 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::forceRelay = false |
Prefer the relay route even when direct is available.
Useful for forced-relay testing. Ignored when noRelay is true.
| 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::noRelay = true |
Disable directory relay routing for gameplay sessions.
When true, global joins still request punch assist, but the client only connects to the server's public UDP endpoint. Set false to allow relay fallback through the directory service.
| 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.
| bool TransportConfig::useUdpSessions = true |
UDP-first session transport.
When true, client/server connect, control, snapshots, events, ping, and disconnects use UdpSessionTransport rather than the legacy TCP stream.