group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
TransportConfig Struct Reference

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.

Detailed Description

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.

Member Data Documentation

◆ allowLegacyTcpFallback

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.

◆ enableUdpSidecar

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.

◆ eventsOverUdp

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.

◆ forceRelay

bool TransportConfig::forceRelay = false

Prefer the relay route even when direct is available.

Useful for forced-relay testing. Ignored when noRelay is true.

◆ inputsOverUdp

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.

◆ noRelay

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.

◆ pingOverUdp

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.

◆ snapshotsOverUdp

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.

◆ useUdpSessions

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.


The documentation for this struct was generated from the following file: