Ditto 5.0.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ditto::Connection Class Reference

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

Public Member Functions

 Connection (const Connection &other)=default
 
 Connection (Connection &&other)=default
 
Connectionoperator= (const Connection &other)=default
 
Connectionoperator= (Connection &&other)=default
 

Public Attributes

std::string id
 Unique identifier for the connection.
 
std::string peer1
 The peer key of the peer at one end of the connection, as a string.
 
std::string peer2
 The peer key of the peer at the other end of the connection, as a string.
 
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

◆ id

std::string ditto::Connection::id

Unique identifier for the connection.

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

◆ peer1

std::string ditto::Connection::peer1

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

The assignment to peer1 and peer2 is deterministic and stable for any two peers.

◆ peer2

std::string ditto::Connection::peer2

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

The assignment to peer1 and peer2 is deterministic and stable for any two peers.