Documentation
Interfaces
client.EventListeners

Interface: EventListeners<SingleConnection>

client.EventListeners

Type parameters

NameType
SingleConnectionextends boolean = false

Properties

connected

Optional connected: (reconnected: boolean) => void

Emitted when the client has successfully connected to the server.

Param

Whether the client has reconnected after the connection was broken.

Type declaration

▸ (reconnected): void

Emitted when the client has successfully connected to the server.

Parameters
NameTypeDescription
reconnectedbooleanWhether the client has reconnected after the connection was broken.
Returns

void

Defined in

src/client.ts:39


connecting

Optional connecting: (reconnecting: boolean) => void

Emitted when the client starts connecting to the server.

Param

Whether the client is reconnecting after the connection was broken.

Type declaration

▸ (reconnecting): void

Emitted when the client starts connecting to the server.

Parameters
NameTypeDescription
reconnectingbooleanWhether the client is reconnecting after the connection was broken.
Returns

void

Defined in

src/client.ts:29


message

Optional message: (message: StreamMessage<SingleConnection, StreamEvent>) => void

Emitted when the client receives a message from the server.

Type declaration

▸ (message): void

Emitted when the client receives a message from the server.

Parameters
NameType
messageStreamMessage<SingleConnection, StreamEvent>
Returns

void

Defined in

src/client.ts:33