Pub Sub
Publish and subscribe messaging attached to this room.
Functions
Link copied to clipboard
suspend fun publish(topic: String, message: String, options: PubSubPublishOptions? = null, payload: JSONObject? = null)
Publishes a message on a topic.
Link copied to clipboard
suspend fun subscribe(topic: String, listener: PubSubMessageListener, options: PubSubSubscribeOptions? = null)
Subscribes to a topic; listener receives every message published on it.
Link copied to clipboard
Stops delivering a topic's messages to listener. A listener that is not subscribed to the topic is ignored.