DittoPeer

data class DittoPeer

An instance of Ditto taking part in the mesh network.

Constructors

Link copied to clipboard
fun DittoPeer(    address: DittoAddress,     peerKey: DittoPeerKey,     deviceName: String,     connections: List<DittoConnection>,     os: String?,     isConnectedToDittoCloud: Boolean,     isCompatible: Boolean?,     dittoSdkVersion: String?,     queryOverlapGroup: Int)
Link copied to clipboard
fun DittoPeer(    address: DittoAddress,     peerKeyString: String,     deviceName: String,     connections: List<DittoConnection>,     os: String?,     isConnectedToDittoCloud: Boolean,     isCompatible: Boolean?,     dittoSdkVersion: String?,     queryOverlapGroup: Int,     peerMetadata: Map<String, Any?> = mapOf(),     identityServiceMetadata: Map<String, Any?> = mapOf())

Initializes a new peer

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int

Properties

Link copied to clipboard
val address: DittoAddress

The unique network identifier of the peer.

Link copied to clipboard
val connections: List<DittoConnection>

Connections that are currently active with the current peer.

Link copied to clipboard
val deviceName: String

The human-readable device name of the peer. This defaults to the hostname but can be manually set by the application developer of the other peer. It is not necessarily unique.

Link copied to clipboard
val dittoSdkVersion: String? = null

The Ditto SDK version the peer is running with..

Link copied to clipboard
val identityServiceMetadata: Map<String, Any?>

Metadata associated with the peer by the identity service.

Link copied to clipboard
val isCompatible: Boolean? = null

Indicates whether the peer is compatible with the current peer.

Link copied to clipboard
val isConnectedToDittoCloud: Boolean

Indication of whether the peer is connected to the Ditto Cloud (big peer).

Link copied to clipboard
val os: String? = null

Operating system of the peer, if known. This detail is learned gradually and may not be known immediately.

Link copied to clipboard
val peerKey: DittoPeerKey

The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic public key used to authenticate it.

Link copied to clipboard
val peerKeyString: String

The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic public key used to authenticate it.

Link copied to clipboard
val peerMetadata: Map<String, Any?>

Metadata associated with the peer, empty dictionary by default.

Link copied to clipboard
val queryOverlapGroup: Int

An optional Query Overlap Group which can be assigned to group certain types of peers together and configure relative connection priorities. Defaults to 0 if not set.