Occupancy

interface Occupancy

This interface is used to interact with occupancy in a chat room: subscribing to occupancy updates and fetching the current room occupancy metrics.

Get an instance via Room.occupancy.

Types

Link copied to clipboard
fun interface Listener

An interface for listening to new occupancy event

Properties

Link copied to clipboard
abstract val channel: Channel

Get underlying Ably channel for occupancy events.

Functions

Link copied to clipboard
Link copied to clipboard
abstract suspend fun get(): OccupancyEvent

Get the current occupancy of the chat room.

Link copied to clipboard
abstract fun subscribe(listener: Occupancy.Listener): Subscription

Subscribe a given listener to occupancy updates of the chat room.