UNPKG

@towercg2/server

Version:

The server runtime for the TowerCG2 video graphics system.

30 lines (29 loc) 974 B
/// <reference types="bunyan" /> /// <reference types="socket.io" /> import Bunyan from "bunyan"; import SocketIO from "socket.io"; import { Config } from "../Config"; export declare class Server { readonly config: Readonly<Config>; private readonly logger; private _started; private _stopping; private http; private httpServer; private io; private readonly plugins; constructor(baseConfig: Config); readonly started: boolean; readonly baseLogger: Bunyan; readonly dataDirectory: string; readonly state: { [pluginName: string]: object; }; readonly authenticatedSockets: Array<SocketIO.Socket>; start(returnImmediately?: boolean): Promise<void>; stop(): Promise<void>; messageToAuthenticated(messageName: string, messageBody: object): void; notifyClientsOfStateChange(pluginName: string): void; private initializeSocketIO(localIdentifiers); private attachSocketIOHandlers(socket); }