Ditto 4.8.0-rc.2
Loading...
Searching...
No Matches
ditto::Connection Class Reference

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

#include <PresenceGraph.hpp>

Public Attributes

std::string id
 Unique identifier for the connection.
 
Pubkey peer1
 The peer key of the peer at one end of the connection.
 
Pubkey peer2
 The peer key of the peer at the other end of the connection.
 
std::string peer_key_string1
 The peer key of the peer at one end of the connection, as a string.
 
std::string peer_key_string2
 The peer key of the peer at the other end of the connection, as a string.
 
float approximate_distance_in_meters
 Estimate of distance to the remote peer.
 
std::string connection_type
 Type of transport enabling this connection.
 

Detailed Description

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

Member Data Documentation

◆ approximate_distance_in_meters

float ditto::Connection::approximate_distance_in_meters

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.

◆ id

std::string ditto::Connection::id

Unique identifier for the connection.

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

◆ peer_key_string1

std::string ditto::Connection::peer_key_string1

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

The assignment to peer_key_string1 and peer_key_string2 is deterministic and stable for any two peers.

◆ peer_key_string2

std::string ditto::Connection::peer_key_string2

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

The assignment to peer_key_string1 and peer_key_string2 is deterministic and stable for any two peers.