A socket.io websocket connection.

Implements

Constructors

Properties

id: string

The id of the connection.

recovered: boolean

Whether the connection state was recovered after a temporary disconnection. In that case, any missed packets will be transmitted to the client, the data attribute and the rooms will be restored.

userId: undefined | string

Accessors

Methods

  • Adds a listener that will be fired when any event is received. The event name is passed as the first argument to the callback.

    Parameters

    • listener: (ev: string, ...args: unknown[]) => void | Promise<void>

      The listener to register.

    Returns void