five-on-it / apps/client/electron/bridge / LocalHost
Interface: LocalHost
Defined in: apps/client/electron/bridge.ts:28
The local game server's controls.
Methods
host()
host(
level):Promise<LocalHosting>
Defined in: apps/client/electron/bridge.ts:34
Starts the bundled game server on level (a level that ships, main-*) and waits until it answers; a server of this version already on the port is used as it is, the level then opening as one of its rooms. Rejects when the port is taken by something else.
Parameters
level
string
Returns
Promise<LocalHosting>
status()
status():
Promise<LocalHosting>
Defined in: apps/client/electron/bridge.ts:38
Whether a server answers on the port, and where friends join it.
Returns
Promise<LocalHosting>
stop()
stop():
Promise<void>
Defined in: apps/client/electron/bridge.ts:36
Stops the server the app started (the players on it are disconnected).
Returns
Promise<void>