Skip to content

WatchRelay beta ​

Class of @v12-engine/engine/server

ts
export declare class WatchRelay

A server that relays a game from the one who shares it to the watchers who connect to it

Members ​

close ​

ts
close(): Promise<void>;

Stops the relay: every connection closed

logger ​

ts
readonly logger: Logger;

What the relay says: see RelayOptions.log

port ​

ts
get port(): number;

The port the relay listens on, the real one where 0 was asked for

start ​

ts
static start(options: RelayOptions): Promise<WatchRelay>;

Starts a relay, and resolves once it listens

watching ​

ts
watching(key: string): number;

How many watch what is shared under a key