Presence

The entrypoint for all actions that relate presence of other peers known by the current peer, either directly or through other peers.

You don't create one directly but can access it from a particular Ditto instance via its presence property.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Set this handler to control which peers in a Ditto mesh can connect to the current peer.

Link copied to clipboard
@get:JvmName(name = "getConnectionRequestHandler")
@set:JvmName(name = "setConnectionRequestHandler")
var connectionRequestHandlerJava: DittoConnectionRequestHandlerCallback?

Set this handler to control which peers in a Ditto mesh can connect to the current peer. Exposed to Java as getConnectionRequestHandler and setConnectionRequestHandler.

Link copied to clipboard

The latest snapshot of information about peers in the Ditto mesh network.

Link copied to clipboard

Metadata associated with the current peer.

Link copied to clipboard

Metadata associated with the current peer.

Functions

Link copied to clipboard
open override fun close()

Stops callbacks from presence graph updates.

Link copied to clipboard
fun finalize()

Close before garbage collection.

Link copied to clipboard

Request information about Ditto peers in the local peer-to-peer network. The V3 observer differs from observePeersV2 by delivering strongly typed objects with documentation in addition to an easy way to get a JSON representation of the presence object graph.