1 quic reliable stream topology and negotiation
forgejo-actions edited this page 2026-07-13 19:45:35 +00:00

QUIC Reliable Stream Topology And Negotiation

QUIC reliable stream topology decides how control, gameplay, and background stream classes are opened, registered, accepted, and routed before realtime packets can flow.

Contract Families

crates/net owns stream negotiation. The client opens reliable streams and writes class registration. The server accepts registrations until the requested topology is satisfied. Game-server realtime transport maps accepted streams to protocol lanes and queue classes.

Single-lane fallback keeps all reliable stream traffic on one stream when multi-class topology is unavailable or intentionally disabled.

Version Fields And Defaults

Stream class registration must be explicit. Control, gameplay, and background classes are semantic lanes, not arbitrary labels. Optional stream classes can fall back to control only when the negotiated topology allows it.

Compatibility Rules

Duplicate class registration, unsupported classes, negotiation timeout, missing required streams, or class mismatch should fail before the game server treats the connection as ready. Optional streams should not be assumed present by gameplay code unless negotiation proved it.

Adding Fields Safely

When adding a stream class or topology mode, update the class directory, client connection setup, server accept path, game-server lane mapping, and timeout behavior together. Keep the single-lane fallback path working until every supported peer can negotiate the new topology.

Test Checklist

Cover class directory routing, duplicate registration rejection, unsupported class rejection, optional stream fallback, timeout behavior, and game-server transport lane mapping.