Interface IGobanSocket<SendProtocol, RecvProtocol>

Interface describing the public API of a GobanSocket (or compatible proxy). Both GobanSocket and GobanSocketProxy satisfy this interface. Extends EventEmitter so on/off/emit types match exactly.

interface IGobanSocket<SendProtocol, RecvProtocol> {
    clock_drift: number;
    connected: boolean;
    latency: number;
    options: GobanSocketOptions;
    url: string;
    authenticate(authentication): void;
    disconnect(): void;
    ping(): void;
    send<Command>(command, data, cb?): void;
    sendPromise<Command>(command, data): Promise<ProtocolResponseType<SendProtocol[Command]>>;
}

Type Parameters

Hierarchy

Properties

clock_drift: number
connected: boolean
latency: number
url: string

Methods