MultipeerReplicatorConfiguration
public struct MultipeerReplicatorConfiguration : CBLConvertible
Configuration for creating a MultipeerReplicator
-
Identifier for discovering and connecting peers.
Declaration
Swift
public let peerGroupID: String
-
Peer identity. The identity’s certificate must be both server and client certificate.
Declaration
Swift
public let identity: TLSIdentity
-
Peer authenticator for verifying the connecting peer’s certificate.
Declaration
Swift
public let authenticator: MultipeerAuthenticator
-
A list of collection configurations for collections to replicate.
Declaration
Swift
public let collections: [MultipeerCollectionConfiguration]
-
Initializes the configuration with a peer group identifier, identity, authenticator, and collections.
Note
To avoid service name collisions in DNS-SD (Bonjour), ensure each peer uses a unique certificate common name (CN) when creating its TLS identity.
Declaration
Swift
public init(peerGroupID: String, identity: TLSIdentity, authenticator: MultipeerAuthenticator, collections: [MultipeerCollectionConfiguration])
Parameters
peerGroupID
The group identifier used for discovering and connecting peers.
identity
The peer’s TLS identity. The certificate must be valid for both client and server authentication.
authenticator
Authenticator for verifying the connecting peer’s certificate.
collections
A list of collection configurations for the collections to replicate.