interface IServerContext {
    addClient(clientId, clientSession): void;
    addListener(event, listener): IServerContext;
    emit(event, ...args): boolean;
    eventNames(): (string | symbol)[];
    flush(): void;
    getClientCount(): number;
    getClients(): Dictionary<string, Session>;
    getCommand(name): IRespCommand;
    getDatabase(id): Database;
    getHost(): string;
    getMaxListeners(): number;
    getPort(): number;
    getScript(sha1): string;
    getValue(key): any;
    listenerCount(type): number;
    listeners(event): Function[];
    off(event, listener): IServerContext;
    on(event, listener): IServerContext;
    once(event, listener): IServerContext;
    prependListener(event, listener): IServerContext;
    prependOnceListener(event, listener): IServerContext;
    publish(channel, message): number;
    putValue(key, value): void;
    rawListeners(event): Function[];
    removeAllListeners(event?): IServerContext;
    removeClient(clientId): void;
    removeListener(event, listener): IServerContext;
    removeValue(key): any;
    scriptExists(sha1): boolean;
    setMaxListeners(n): IServerContext;
    setScript(code): string;
}

Hierarchy

Implemented by

Methods

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Returns (string | symbol)[]

  • Parameters

    • type: string | symbol

    Returns number

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns IServerContext