-
Notifications
You must be signed in to change notification settings - Fork 2
Server Browser
The server browser suits persistent dedicated servers that stay up between matches. A running server heartbeats into a registry, and players list the live servers and connect to one directly.
A server reports itself with POST /v1/fleets/heartbeat on an interval. The key needs the fleet scope, because a server registers itself with a server-tier key rather than a player session. The heartbeat carries the server's name, address, region, player counts, game mode, level, and version.
Players read the live list with GET /v1/fleets/{fleet}/servers using their session token. Each entry gives the address to connect to, so joining is a direct dial with no extra ggscale call.
# client lists servers in a fleet
curl -s http://localhost:8080/v1/fleets/arena/servers \
-H "Authorization: Bearer <api_key>" \
-H "X-Session-Token: <access_token>"Full reference: the /v1/fleets/heartbeat and /v1/fleets/{fleet}/servers operations.