Ditto 4.7.4
|
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. | |
Contains information about a remote peer that has requested a connection.
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.
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.
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.
std::string ditto::ConnectionRequest::peer_key_string | ( | ) | const |
The unique peer key of the remote peer.
nlohmann::json ditto::ConnectionRequest::peer_metadata | ( | ) | const |
Metadata associated with the remote peer.
Empty map if the remote peer has not set any metadata, or when this request is for a WebSocket connection (which does not currently support peer 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.
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 if the remote peer has not set any metadata or when this request is for a WebSocket connection.
Set peer metadata for the local peer using Presence::set_peer_metadata or Presence::set_peer_metadata_json_string.