Ditto 4.8.1-rc.1
Loading...
Searching...
No Matches
ditto::ConnectionRequest Class Reference

Contains information about a remote peer that has requested a connection. More...

#include <ConnectionRequest.hpp>

Public Member Functions

std::string peer_key_string () const
 The unique peer key of the remote peer.
 
nlohmann::json peer_metadata () const
 Metadata associated with the remote peer.
 
std::string peer_metadata_json_string () const
 JSON encoded metadata associated with the remote peer.
 
nlohmann::json identity_service_metadata () const
 Metadata for the remote peer that is provided by the identity service.
 
std::string identity_service_metadata_json_string () const
 JSON-encoded metadata for the remote peer that is provided by the identity service.
 
ConnectionType connection_type () const
 The network transport of this connection request.
 

Detailed Description

Contains information about a remote peer that has requested a connection.

Member Function Documentation

◆ connection_type()

ConnectionType ditto::ConnectionRequest::connection_type ( ) const

The network transport of this connection request.

Expect to receive separate connection requests for each network transport that connects the local and remote peer.

◆ identity_service_metadata()

nlohmann::json ditto::ConnectionRequest::identity_service_metadata ( ) const

Metadata for the remote peer that is provided 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.

Convenience property that wraps identity_service_metadata_json_string.

◆ identity_service_metadata_json_string()

std::string ditto::ConnectionRequest::identity_service_metadata_json_string ( ) const

JSON-encoded metadata for the remote peer that is provided 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_string()

std::string ditto::ConnectionRequest::peer_key_string ( ) const

The unique peer key of the remote peer.

See also
Peer::peer_key_string for more information on peer keys.

◆ peer_metadata()

nlohmann::json ditto::ConnectionRequest::peer_metadata ( ) const

Metadata associated with the remote peer.

Empty json object/map if the remote peer has not set any metadata.

Set peer metadata for the local peer using Presence::set_peer_metadata or Presence::set_peer_metadata_json_string.

Convenience property that wraps peer_metadata_json_string.

◆ peer_metadata_json_string()

std::string ditto::ConnectionRequest::peer_metadata_json_string ( ) const

JSON encoded metadata associated with the remote peer.

JSON string representing an empty json object/map.

Set peer metadata for the local peer using Presence::set_peer_metadata or Presence::set_peer_metadata_json_string.