Agama Installer
    Preparing search index...

    Class WSClient

    Agama WebSocket client.

    Connects to the Agama WebSocket server and reacts on the events. This class is not expected to be used directly, but through the HTTPClient API.

    Index

    Constructors

    Methods

    • Registers a handler for close socket.

      The handler is executed when the socket is close.

      Parameters

      • func: BaseHandlerFn

      Returns RemoveFn

    • Registers a handler for socket errors.

      The handler is executed when an error is reported by the socket.

      Parameters

      • func: ErrorHandlerFn

      Returns RemoveFn

    • Registers a handler for events.

      The handler is executed for all events. It is up to the callback to filter the relevant ones for it.

      Parameters

      • func: EventHandlerFn

      Returns RemoveFn

    • Registers a handler for open socket.

      The handler is executed when the socket is open.

      Parameters

      • func: BaseHandlerFn

      Returns RemoveFn