Ditto 4.8.1-rc.1
Loading...
Searching...
No Matches
DittoSDK.DittoConnection Struct Reference

Represents a connection between two peers in a Ditto mesh network. More...

Inherits IEquatable< DittoConnection >.

Public Member Functions

 DittoConnection (string id, DittoConnectionType connectionType, string peerKeyString1, string peerKeyString2, double? approximateDistanceInMeters=null)
 Initializes a new instance of the DittoConnection struct.
 
bool Equals (DittoConnection other)
 

Public Attributes

string Id
 Unique identifier for the connection.
 
byte[] Peer1
 Peer key of one end of the connection.
 
byte[] Peer2
 Peer key of one end of the connection.
 
DittoConnectionType ConnectionType
 Shows connection type.
 
double? ApproximateDistanceInMeters
 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.
 

Properties

string PeerKeyString1 [get, set]
 The peer key of the peer at one end of the connection, as a string.
 
string PeerKeyString2 [get, set]
 The peer key of the peer at the other end of the connection, as a string.
 

Detailed Description

Represents a connection between two peers in a Ditto mesh network.

Member Data Documentation

◆ Id

string DittoSDK.DittoConnection.Id

Unique identifier for the connection.

This ID is deterministic for any two peers and a given connection type.

Property Documentation

◆ PeerKeyString1

string DittoSDK.DittoConnection.PeerKeyString1
getset

The peer key of the peer at one end of the connection, as a string.

The assignment to PeerKeyString1 and PeerKeyString2 is deterministic and stable for any two peers.

◆ PeerKeyString2

string DittoSDK.DittoConnection.PeerKeyString2
getset

The peer key of the peer at the other end of the connection, as a string.

The assignment to PeerKeyString1 and PeerKeyString2 is deterministic and stable for any two peers.