6#include "core/Args.hpp"
31 void onLine(
int connectionId,
const std::string& line);
35 void _promoteToAi(
int connectionId,
const std::string& teamName);
std::function< void(int connectionId, int playerId)> PromotedCallback
Owns every client socket and runs the poll() loop.
Single owner of game frequency and elapsed game time.
Handles the first exchange with a new socket.
void onNewConnection(int connectionId)
New socket: send the "WELCOME" greeting.
const ServerConfig & _config
void onLine(int connectionId, const std::string &line)
The client's reply (its team name).
void _promoteToGui(int connectionId)
void _reject(int connectionId)
PromotedCallback _onPromoted
void _promoteToAi(int connectionId, const std::string &teamName)
Pure game state - no networking, no scheduling.
Represents the configuration for the server application, described by: