ChannelSocket
ChatroomSocket
contains methods to interact with the WebSocket in relation to channel events.
Internally, Kient uses the Pusher channel channel.${channelId}
.
Methods
async listen(channelId)
Listens to a specific channel and emits related events.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channelId | string | number | true | The ID of the channel to listen to |
Returns
Promise<void>
async disconnect(channelId)
Disconnects from a specific channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channelId | string | number | true | The ID of the channel to disconnect from |
Returns
Promise<void>