Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IClientEvents

Hierarchy

  • IClientEvents

Implemented by

Index

Methods

Methods

on

  • on(event: "open" | "close", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: "event", listener: function): this
  • on(event: "event <name>", listener: function): this
  • Emitted when the connection closes/opens.

    Parameters

    • event: "open" | "close"
    • listener: function
        • (): void
        • Returns void

    Returns this

  • Emitted on error, throws if there is no listener.

    Parameters

    • event: "error"
    • listener: function
        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns this

  • RPC event sent by the server. If the event name is given a type constructor in IClientOptions.eventTypes the data will be decoded before the event is emitted.

    Parameters

    • event: "event"
    • listener: function
        • (name: string, data?: Uint8Array | object): void
        • Parameters

          • name: string
          • Optional data: Uint8Array | object

          Returns void

    Returns this

  • Parameters

    • event: "event <name>"
    • listener: function
        • (data?: Uint8Array | object): void
        • Parameters

          • Optional data: Uint8Array | object

          Returns void

    Returns this

Generated using TypeDoc