Network Model¶
The network/ directory contains transport and server integrations. PeerConnection provides WebSocket peer communication; HybridPeerManager can negotiate WebRTC and fall back through WebSocket signaling or transport. UniversalRelayServer forwards peer traffic, while AuthoritativeServer and RoomAuthoritativeServer provide server-side room models for deployments that choose an authority.
NetworkManager connects an Engine to a network object and a ConsensusCore. Peers exchange Automerge sync blobs, not serialized gameplay commands. MessageCodec handles wire framing; it reserves an encrypted flag, but generic E2E encryption is not wired into the sync path.
The CLI relay is intentionally unauthenticated. Treat it as signaling/message forwarding, not as identity, authorization, anti-cheat, or privacy infrastructure. Stronger trust requirements need a suitable authoritative or authenticated deployment design.