Rooms

interface Rooms

Manages the lifecycle of chat rooms.

Not suitable for inheritance

This interface is not designed for client implementation or extension. The interface definition may evolve over time with additional properties or methods to support new features, which could break client implementations.

Functions

Link copied to clipboard
abstract suspend fun get(name: String, options: RoomOptions = buildRoomOptions()): Room

Gets a room reference by ID. The Rooms class ensures that only one reference exists for each room. A new reference object is created if it doesn't already exist, or if the one used previously was released using release(name).

Link copied to clipboard
suspend fun Rooms.get(roomName: String, initOptions: MutableRoomOptions.() -> Unit): Room

Spec: CHA-RC4

Link copied to clipboard
abstract suspend fun release(name: String)

Release the Room object if it exists. This method only releases the reference to the Room object from the Rooms instance and detaches the room from Ably. It does not unsubscribe to any events.