NomadsReach 4c6f0ccd06 Skip GNS live-socket tests when the environment has no socket
The self-hosted CI runner is network-isolated, so co_gns_server_create can't
bind a UDP listen socket and the two live tests hard-failed. Treat that
specific condition as a skip (exit 0 with a SKIP notice) instead of a failure;
the bridge is still exercised in full wherever a socket can be created.
2026-08-16 18:27:36 -04:00
2026-08-16 02:36:32 -04:00
2026-08-16 02:36:32 -04:00
2026-08-16 02:36:32 -04:00
2026-08-16 02:36:32 -04:00
2026-08-16 02:36:32 -04:00
2026-08-01 18:43:40 +12:00
2026-08-16 02:36:32 -04:00

Commonwealth Online Server and Qt Host

This repository contains the Commonwealth Online authoritative dedicated server and the Qt Host GUI.

The dedicated server is C#/.NET. Valve GameNetworkingSockets remains behind the small native C++ bridge in server/native_transport/.

Server

cd server
dotnet build CommonwealthOnline.Server.csproj -c Release
dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release
dotnet run --project CommonwealthOnline.Server.csproj -- serve --config commonwealth-server.json --interactive

The server owns Protocol V2 admission, server-owned player IDs, packet validation, movement validation, interest filtering, durable player state, scoped NPC authority and epochs, combat routing, world state, bans, rate limits, LAN discovery and localhost administration.

Transport policy remains:

  • transform, npcState: unreliable/sequenced under GNS
  • session/control, player state, combat, world state and authority: reliable/ordered

TCP compatibility keeps newline framing inside the TCP transport only. GNS is message-oriented and uses the COG2 snapshot sequence envelope for latest-wins snapshots.

Native GNS bridge

server/native_transport stays C++ and owns only GNS listen/connection/message mechanics and endpoint lookup. C# loads the existing C ABI directly.

Qt Host GUI

The Qt Host remains native C++. It launches the published CommonwealthOnline.Server process and uses the authenticated localhost admin channel for stats, clients, kicks and bans.

Build requirements on Windows:

  • Visual Studio 2022 C++ tools
  • CMake 3.20+
  • Qt 6.4+
  • .NET 8 SDK
check-setup.bat
build.bat
deploy.bat

CMake publishes the C# server self-contained and stages it under the Host GUI server directory. Packaged users do not need a separate .NET runtime.

Default ports

  • TCP 7777: gameplay compatibility
  • UDP 7777: GNS gameplay when enabled
  • UDP 7778: LAN discovery
  • TCP 127.0.0.1:7779: authenticated admin control

See server/README.md, SETUP.md, DEVELOPMENT.md, and DEPLOYMENT.md.

S
Description
No description provided
Readme
896 KiB
2026-08-06 12:34:56 +12:00
Languages
Python 72.3%
C++ 17.5%
Batchfile 5.5%
Shell 3.5%
CMake 1.2%