Class Bagman

Hierarchy

  • Bagman

Constructors

Properties

config: BagmanConfig

Configuration for this Bagman Client

securityCtx: SecurityContext

The Holder for Authentication

socket: ClientSocket

The socket connection.

Methods

  • Returns Promise<void>

  • Returns void

  • Listens to a specific global event.

    Throws

    When an invalid event is provided.

    Type Parameters

    • T extends any[]

      The type of the arguments to be passed to the callback.

    Parameters

    • event: GlobalEvent

      The global event to listen to.

    • cb: ((...args: T) => void | Promise<void>)

      The callback to be called when the event is emitted.

        • (...args: T): void | Promise<void>
        • Parameters

          • Rest ...args: T

          Returns void | Promise<void>

    Returns void

  • Subscribes to a channel.

    Returns

    A promise that resolves with a Channel instance.

    Parameters

    • channel: string

      The channel to subscribe to.

    Returns Promise<Channel>

Generated using TypeDoc