DittoConnection

data class DittoConnection(    val id: String,     val peer1: DittoPeerKey,     val peer2: DittoPeerKey,     val connectionType: DittoConnectionType,     val approximateDistanceInMeters: Double?)

Represents a connection between two peers on the Ditto mesh network.

Constructors

Link copied to clipboard
fun DittoConnection(    id: String,     peer1: DittoPeerKey,     peer2: DittoPeerKey,     connectionType: DittoConnectionType,     approximateDistanceInMeters: Double?)

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 approximateDistanceInMeters: Double?

Gets an estimate of distance to the remote peer. This value is inaccurate. The environment, hardware, and several other factors can greatly affect this value. It is currently derived from RSSI.

Link copied to clipboard
val connectionType: DittoConnectionType

Type of transport enabling this connection.

Link copied to clipboard
val id: String

Unique identifier for the connection.

Link copied to clipboard
val peer1: DittoPeerKey

Peer Key of one end of the connection.

Link copied to clipboard
val peer2: DittoPeerKey

Peer Key of the other end of the connection.