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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
chatroomId | string | number | true | The ID of the chatroom to listen to |
Returns
Promise<void>
async disconnect(chatroomId)
Disconnects from a specific chatroom.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
chatroomId | string | number | true | The ID of the chatroom to disconnect from |
Returns
Promise<void>