Skip to content

PrivateChatroomSocket

PrivateChatroomSocket contains methods to interact with the WebSocket in relation to private chatroom events.

Internally, Kient uses the Pusher channel private-chatroom_${chatroomId}.

Methods

Authentication Required async listen(chatroomId)

Listens to a specific chatroom and emits related events.

ParameterTypeRequiredDefaultDescription
chatroomIdstring | numbertrueThe ID of the chatroom to listen to

Returns

Promise<void>


async disconnect(chatroomId)

Disconnects from a specific chatroom.

ParameterTypeRequiredDefaultDescription
chatroomIdstring | numbertrueThe ID of the chatroom to disconnect from

Returns

Promise<void>