Skip to main content

IServerHostController

An interface in Root.Township, the global namespace.

Hook for an outside host to start, reset and stop the server and track player counts. Clients bind FakeHostController (all no-ops); the managers that receive it never call it in this build.

Properties​

MemberWhat it is
bool IsOfflineServer { get; }True for an offline server. FakeHostController returns true.

Methods​

MemberWhat it is
void CancelEmptyServerShutdown(bool disablePermanently = false)Cancels a pending shutdown of an empty server, optionally for good.
Task HandlePlayersCountChange(int newCount)Called with the new player count.
void MarkServerReady()Marks the server ready for players.
Task ResetServer()Resets the server.
Task Start()Starts hosting.
Task Stop()Stops hosting.

Used in​

Members of other types that take, return or hold a IServerHostController: