Interface: EventListeners<SingleConnection>
client.EventListeners
Type parameters
Name | Type |
---|---|
SingleConnection | extends 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
Name | Type | Description |
---|---|---|
reconnected | boolean | Whether the client has reconnected after the connection was broken. |
Returns
void
Defined in
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
Name | Type | Description |
---|---|---|
reconnecting | boolean | Whether the client is reconnecting after the connection was broken. |
Returns
void
Defined in
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
Name | Type |
---|---|
message | StreamMessage <SingleConnection , StreamEvent > |
Returns
void