PrivateChannelSocket
PrivateChannelSocket
contains methods to interact with the WebSocket in relation to private channel events.
Internally, Kient uses the Pusher channel private-channel_${channelId}
.
Methods
Authentication Required 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>