64 void* childProcess =
nullptr;
Starts, monitors, and shuts down a server process spawned by the client.
Definition HostedServer.hpp:37
void clearSession()
Forget hosted-session metadata after a confirmed local or remote shutdown.
Definition HostedServer.cpp:491
uint16_t port()
Actual server port reported by the child process, or 0 when not running.
Definition HostedServer.cpp:481
bool isRunning()
True if the app still owns a child server process.
Definition HostedServer.cpp:444
bool start(const HostConfigState &config, std::string &outError)
Launch the server executable with the requested hosting options.
Definition HostedServer.cpp:164
bool hasSession() const
True when this client has launched a hosted session and still knows its port.
Definition HostedServer.cpp:486
uint16_t boundPort
Port printed by the child server READY line.
Definition HostedServer.hpp:69
void shutdown()
Stop the locally owned hosted server process.
Definition HostedServer.cpp:378
void detachForPersistence()
Drop local ownership of a persistent server after successful launch.
Definition HostedServer.cpp:364
pid_t childPid
POSIX child pid for the hosted server, or -1 when none is running.
Definition HostedServer.hpp:67
Persistent host-screen options used when launching a local server.
Definition HostedServer.hpp:17
int killsToWin
Match config: kill threshold to win, sent to the server on launch and update.
Definition HostedServer.hpp:25
bool useSpecificPort
True when the user explicitly selected a port.
Definition HostedServer.hpp:19
bool persistAfterClientExit
True to detach the hosted server after launch so it survives client exit.
Definition HostedServer.hpp:21
int maxPlayers
Match config: maximum number of connected players accepted by the server.
Definition HostedServer.hpp:26
std::string serverName
Name advertised in LAN/global server browsers for this hosted session.
Definition HostedServer.hpp:24
bool advertiseLan
Initial LAN-discovery visibility for the hosted server.
Definition HostedServer.hpp:23
float powerupInitialSpawnDelaySeconds
Match config: seconds before powerups first appear.
Definition HostedServer.hpp:27
bool useLegacyTcp
True to force the hosted server to legacy TCP transport.
Definition HostedServer.hpp:20
int port
Requested port when useSpecificPort is true; 0 means auto.
Definition HostedServer.hpp:18
float powerupRespawnCooldownSeconds
Match config: seconds before picked-up powerups reappear.
Definition HostedServer.hpp:28
bool advertiseGlobal
Initial global-directory visibility for the hosted server.
Definition HostedServer.hpp:22
Reserved metadata for an active hosted session.
Definition HostedServer.hpp:33