DittoConnectionRequest
public class DittoConnectionRequest
extension DittoConnectionRequest: CustomStringConvertible
Contains information about a remote peer that has requested a connection.
Connection requests and their authorization are scoped to a specific Ditto peer and connection type.
-
The unique peer key of the remote peer.
See also
DittoPeer.peerKeyString
for more information on peer keys.Declaration
Swift
public var peerKeyString: String { get }
-
Metadata associated with the remote peer.
Empty dictionary if the remote peer has not set any metadata.
Set peer metadata for the local peer using
DittoPresence.setPeerMetadata(_:)
orDittoPresence.setPeerMetadataJSONData(_:)
.Convenience property that wraps
peerMetadataJSONData
.Declaration
Swift
public var peerMetadata: [String : Any?] { get }
-
JSON-encoded metadata associated with the remote peer.
JSON string representing an empty dictionary if the remote peer has not set any metadata.
Set peer metadata for the local peer using
DittoPresence.setPeerMetadata(_:)
orDittoPresence.setPeerMetadataJSONData(_:)
.Uses UTF-8 encoding.
Declaration
Swift
public var peerMetadataJSONData: Data { get }
-
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
identityServiceMetadataJSONData
.Declaration
Swift
public var identityServiceMetadata: [String : Any?] { get }
-
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.
Uses UTF-8 encoding.
Declaration
Swift
public var identityServiceMetadataJSONData: Data { get }
-
The network transport of this connection request.
Expect to receive separate connection requests for each network transport that connects the local and remote peer.
Declaration
Swift
public var connectionType: DittoConnectionType { get }
-
Declaration
Swift
public var description: String { get }