A class for managing event channels and event handling callback functions.

Constructors

Properties

_ain: default

The Ain object.

_customClientId: string

The custom client id of the event channel.

_eventCallbackManager: default

The event callback manager object.

_handshakeTimeout?: null | Timeout

The handshake timeout object.

_heartbeatTimeout?: null | Timeout

The heartbeat timeout object.

_isConnected: boolean

Whether it's connected or not.

_ws?: WebSocket

The web socket client.

Accessors

Methods

  • Opens a new event channel.

    Parameters

    • Optional connectionCallback: ConnectionCallback

      The connection callback function.

    • Optional disconnectionCallback: DisconnectionCallback

      The disconnection callback function.

    • Optional customClientId: string

      The custom client id to set.

    Returns Promise<any>

    A promise for the connection success.

  • Sends a SET_CUSTOM_CLIENT_ID messsage to the event channel.

    Parameters

    • customClientId: string

      The custom client id to set.

    Returns void