interface IServer {
    emitToGroup(group: string, method: string, ...params: any): void;
    groupMemberCount(group: string): number;
    handleUpgrade(
        request: IncomingMessage,
        socket: Duplex,
        upgradeHead: Buffer,
    ): void;
    iterateGroup(group: string, cb: (context: Context) => void): void;
    onGroupRemoved(group: string, method: undefined | () => void): void;
    RegisterFunction(
        name: string,
        method: (context: Context, ...args: any[]) => any,
    ): void;
}

Hierarchy (View Summary)

Methods

  • Emits an event to a specified group.

    Parameters

    • group: string

      The name of the group to emit the event to.

    • method: string

      The method name to be called on the group.

    • ...params: any

      Additional parameters to be passed to the method.

    Returns void

  • Parameters

    • request: IncomingMessage
    • socket: Duplex
    • upgradeHead: Buffer

    Returns void

  • Iterates over a specified group and executes a callback function for each context.

    Parameters

    • group: string

      The name of the group to iterate over.

    • cb: (context: Context) => void

      The callback function to be executed for each context.

    Returns void

  • Parameters

    • group: string
    • method: undefined | () => void

    Returns void

  • Parameters

    • name: string
    • method: (context: Context, ...args: any[]) => any

    Returns void