Server Networking (network-server)

This document explains the actual network-server package implementation and the APIs you will use from server-side code.

Overview

The server listens on configured ports and accepts client connections. A single server process can accept many clients; typical server responsibilities in a game are:

  • Accept reliable control messages from clients over the TCP (WebSocket) channel.

  • Optionally establish `RTCPeerConnection`s (via WebSocket signaling) to receive unreliable, unordered data channels for low-latency state updates.

Example

It works exactly the same with UDP

Notes

  • See docs/network/network-server-api.rst for the exact list available functions.

  • For packet framing and terminator semantics see docs/network/packet-framing.rst.