onDisconnected

abstract fun onDisconnected(room: ChatRoom, reason: DisconnectReason)

Called when room connection is closed and user is no longer able to send and receive messages, occurs when the room transitions into disconnected state.

Parameters

room

ChatRoom instance

reason

reason why the room has disconnected