class Presence
Listen for presence changes
Entry |
A presence entry class Entry : JSONObject |
Options |
Presence options class Options |
<init> |
Listen for presence changes Presence(channel: Channel, opts: Options = Options()) |
channel |
A channel val channel: Channel |
opts |
Options val opts: Options |
inPendingSyncState |
Is there any pendinng sync state fun inPendingSyncState(): Boolean |
list |
Returns the list of presence fun list(by: (String, Entry) -> Entry = { _, p -> p }): List<Entry> |
onJoin |
Set the callback for join event fun onJoin(callback: (key: String, currentPresence: Entry?, newPresence: Entry) -> Unit): Unit |
onLeave |
Set the callback for leave event fun onLeave(callback: (key: String, currentPresence: Entry?, leftPresence: Entry) -> Unit): Unit |
onSync |
Set the callback for sync event fun onSync(callback: () -> Unit): Unit |