Skip to content

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.

ParameterTypeRequiredDefaultDescription
channelIdstring | numbertrueThe ID of the channel to listen to

Returns

Promise<void>


async disconnect(channelId)

Disconnects from a specific channel.

ParameterTypeRequiredDefaultDescription
channelIdstring | numbertrueThe ID of the channel to disconnect from

Returns

Promise<void>