DittoConnection

data class DittoConnection(    val id: String,     val peer1: DittoAddress,     val peer2: DittoAddress,     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: DittoAddress,     peer2: DittoAddress,     connectionType: DittoConnectionType,     approximateDistanceInMeters: Double?)

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: DittoAddress

DittoAddress of one end of the connection.

Link copied to clipboard
val peer2: DittoAddress

DittoAddress of the other end of the connection.