DittoPeer

data class DittoPeer

Represents a peer in a Ditto mesh network.

Constructors

Link copied to clipboard
constructor(address: DittoAddress, peerKey: DittoPeerKey, deviceName: String, connections: List<DittoConnection>, os: String?, isConnectedToDittoCloud: Boolean, isCompatible: Boolean?, dittoSdkVersion: String?, queryOverlapGroup: Int)
constructor(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

Properties

Link copied to clipboard

The unique network identifier of the peer.

Link copied to clipboard

Connections that are currently active with the current peer.

Link copied to clipboard

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

The Ditto SDK version the peer is running with..

Link copied to clipboard

Metadata associated with the peer by the identity service.

Link copied to clipboard

Indicates whether the peer is compatible with the current peer.

Link copied to clipboard

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

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

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

Metadata associated with the peer, empty dictionary by default.

Link copied to clipboard

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.

Functions

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