DittoConfigConnect
public enum DittoConfigConnect
extension DittoConfigConnect: Codable
Specifies how this instance discovers and connects to peers, including
network settings and authentication options. This is a substructure of
DittoConfig.
-
Connects this Ditto instance to a Big Peer at the specified URL.
Important
For sync to work with server connections, Ditto requires (a) aDittoAuthenticationExpirationHandlerto be set viaditto.auth.expirationHandler, and (b) that handler to properly authenticate when requested.start()will throw if the expiration handler isnil.Declaration
Swift
case server(url: URL) -
Restricts connectivity to small peers only, optionally using a shared secret (in the form of a private key) for authentication.
If a
privateKeyis provided, it will be used as a shared secret for authenticating peer-to-peer connections. The default value isnil, which means no encryption is used in transit.Declaration
Swift
case smallPeersOnly(privateKey: String? = nil)
-
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws