Ditto 5.0.0
Loading...
Searching...
No Matches
DittoSDK.Transport.DittoPeer Struct Reference

Represents a peer in a Ditto mesh network. More...

Public Member Functions

 DittoPeer (string peerKey, List< DittoConnection > connections, string deviceName, bool isConnectedToDittoServer, DittoPeerOS? os=null, string dittoSdkVersion=null, bool? isCompatible=null, Dictionary< string, object > peerMetadata=null, Dictionary< string, object > identityServiceMetadata=null)

Properties

string PeerKey [get, set]
 The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic public key used to authenticate it.
DittoPeerOSOs [get, set]
 The OS that the peer is running on.
bool IsConnectedToDittoServer [get, set]
 Shows if the peer is connected to the Ditto Server.
bool? IsCompatible [get, set]
 Shows if the peer is compatible with the local one.
Dictionary< string, object > PeerMetadata [get, set]
 Metadata associated with the peer, empty dictionary by default.
Dictionary< string, object > IdentityServiceMetadata [get, set]
 Metadata associated with the peer by the identity service.
string? DittoSDKVersion [get, set]
 Shows the peer's SDK version.
string DeviceName [get, set]
 Gets the human-readable device name of the peer. This defaults to the hostname but can be manually set by the application developer of the other peer. It is not necessarily unique.
List< DittoConnectionConnections [get, set]
 Gets the connections that are currently active with the remote peer.

Detailed Description

Represents a peer in a Ditto mesh network.

Property Documentation

◆ IdentityServiceMetadata

Dictionary<string, object> DittoSDK.Transport.DittoPeer.IdentityServiceMetadata
getset

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.

◆ PeerKey

string DittoSDK.Transport.DittoPeer.PeerKey
getset

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 empty when a peer is not updated to the latest version of the SDK.

◆ PeerMetadata

Dictionary<string, object> DittoSDK.Transport.DittoPeer.PeerMetadata
getset

Metadata associated with the peer, empty dictionary by default.

Use DittoPresence.SetPeerMetadata(Dictionary<string, object>) or DittoPresence.SetPeerMetadataJsonString(string) to set this value.

Peer metadata is dynamic and may change over the lifecycle of the DittoPresenceGraph. It may be empty when a remote peer initially appears in the presence graph and will be updated once the peer has synced its metadata with the local peer.

See also
DittoPresence.PeerMetadata