DittoRemotePeer
public struct DittoRemotePeer : Codable
extension DittoRemotePeer: Identifiable
A summary snapshot of the types of connections currently active to a remote Ditto peer.
-
The network ID as found in a peer’s announce string. This uniquely identifies a given peer.
Declaration
Swift
public let networkId: String
-
The device name of the remote peer.
Declaration
Swift
public let deviceName: String
-
The connections that are currently active with the remote peer.
Declaration
Swift
public let connections: [String]
-
Initializes a
DittoRemotePeer
with a device name and connections. There should be no reason to manually initialize aDittoRemotePeer
. Instead, you should use theDittoSyncKit.observePeers()
function to receive updates about which peers DittoSyncKit has observed in the nearby mesh network.Declaration
Swift
public init(networkId: String, deviceName: String, connections: [String])
-
Declaration
Swift
public var id: String { get }