Ditto 4.7.2
Loading...
Searching...
No Matches
Public Attributes | List of all members
ditto::Peer Class Reference

Represent a known peer in the Ditto network. More...

#include <PresenceGraph.hpp>

Public Attributes

DittoAddress address
 Address to contact this peer via Ditto Bus.
 
DITTO_DEPRECATED std::vector< uint8_tpeer_key
 
std::string peer_key_string
 The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic public key used to authenticate it.
 
std::string device_name
 The human-readable device name of the remote peer. This defaults to the hostname but can be manually set by the application developer of the other peer. It is not necessarily unique.
 
std::string os
 Operating system of the remote peer.
 
uint8_t query_overlap_group
 An optional Query Overlap Group which can be assigned to group certain types of peers together and configure relative connection priorities.
 
bool is_connected_to_ditto_cloud
 Indicates whether the peer is connected to Ditto Cloud.
 
bool is_compatible
 Indicates whether the peer is compatible with the current peer.
 
std::string ditto_sdk_version
 The Ditto SDK version the peer is running with.
 
std::vector< Connectionconnections
 Currently active connections of the peer.
 
nlohmann::json peer_metadata
 Metadata associated with the peer, or empty map by default.
 
nlohmann::json identity_service_metadata
 Metadata associated with the peer by the identity service.
 

Detailed Description

Represent a known peer in the Ditto network.

Member Data Documentation

◆ identity_service_metadata

nlohmann::json ditto::Peer::identity_service_metadata

Metadata associated with the peer by the identity service.

Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.

◆ peer_key

DITTO_DEPRECATED std::vector<uint8_t> ditto::Peer::peer_key
Deprecated
Use peer_key_string instead. instead.

◆ peer_key_string

std::string ditto::Peer::peer_key_string

The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic public key used to authenticate it.

Note
This will be be empty when a peer is not updated to the latest version of the SDK.

◆ peer_metadata

nlohmann::json ditto::Peer::peer_metadata

Metadata associated with the peer, or empty map by default.

Use Presence::set_peer_metadata or Presence::set_peer_metadata_json_string to set this value.

This will be empty when a peer is only connected via a WebSocket connection.

See also
Presence::peer_metadata for details on usage of metadata.

◆ query_overlap_group

uint8_t ditto::Peer::query_overlap_group

An optional Query Overlap Group which can be assigned to group certain types of peers together and configure relative connection priorities.

Defaults to 0 if not set.