DittoPeer
public struct DittoPeer
extension DittoPeer: Equatable
extension DittoPeer: Hashable
extension DittoPeer: Codable
Undocumented
-
Address to contact this peer via Ditto Bus.
Declaration
Swift
public var address: DittoAddress
-
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.
Declaration
Swift
public var peerKey: Data
-
Currently active connections of the peer.
Declaration
Swift
public var connections: [DittoConnection]
-
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.
Declaration
Swift
public var deviceName: String
-
Indicates whether the peer is connected to Ditto Cloud.
Declaration
Swift
public var isConnectedToDittoCloud: Bool
-
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.
Declaration
Swift
public var queryOverlapGroup: UInt8
-
Undocumented
Declaration
Swift
public var os: String?
-
The Ditto SDK version the peer is running with.
Declaration
Swift
public var dittoSDKVersion: String?
-
Indicates whether the peer is compatible with the current peer.
Declaration
Swift
public var isCompatible: Bool?
-
init(address:
peerKey: connections: deviceName: isConnectedToDittoCloud: queryOverlapGroup: os: dittoSDKVersion: isCompatible: ) Initializes a new peer.
Declaration
Swift
public init(address: DittoAddress, peerKey: Data, connections: [DittoConnection], deviceName: String, isConnectedToDittoCloud: Bool, queryOverlapGroup: UInt8, os: String? = nil, dittoSDKVersion: String? = nil, isCompatible: Bool? = nil)
-
Declaration
Swift
public init(from decoder: Decoder) throws