URLEndpointListenerConfiguration

public struct URLEndpointListenerConfiguration

ENTERPRISE EDITION ONLY.

The configuration used for configuring and creating a URLEndpointListener.

  • The database object associated with the listener.

    Declaration

    Swift

    @available(*, deprecated, message: "Use collections instead.")
    public let database: Database
  • The port that the listener will listen to. Default value is URLEndpointListenerConfiguration.defaultPort. If the value is 0, it means that the listener will automatically, select an available port to listen to when the listener is started.

    Declaration

    Swift

    public var port: UInt16?
  • The network interface in the form of the IP Address or network interface name such as en0 that the listener will listen to. The default value is nil which means that the listener will listen to all network interfaces.

    Declaration

    Swift

    public var networkInterface: String?
  • Disable TLS communication. The default value is URLEndpointListenerConfiguration.defaultDisableTls

    Declaration

    Swift

    public var disableTLS: Bool
  • The TLS Identity used for configuring TLS Communication. The default value is nil which means that a generated anonymous self-signed identity will be used unless the disableTLS property is set to YES.

    Declaration

    Swift

    public var tlsIdentity: TLSIdentity?
  • The authenticator used by the listener to authenticate clients.

    Declaration

    Swift

    public var authenticator: ListenerAuthenticator?
  • Allow delta sync when replicating with the listener. The default value is URLEndpointListenerConfiguration.defaultEnableDeltaSync.

    Declaration

    Swift

    public var enableDeltaSync: Bool
  • Allow only pull replication to pull changes from the listener. The default value is URLEndpointListenerConfiguration.defaultReadOnly.

    Declaration

    Swift

    public var readOnly: Bool
  • The collections available for replication.

    When the init(database:) is used, the collections property will contain the default collection.

    Declaration

    Swift

    public var collections: [Collection]
  • Init with the database object to make the default collection available for the replication.

    Declaration

    Swift

    @available(*, deprecated, message: "Use init(collections:﹚ instead.")
    public init(database: Database)

    Parameters

    database

    The local database.

  • Init with the collections that will be available for replication.

    The specified collections must contain at least one collection, otherwise an Invalid Argument Exception will be thrown.

    All of the collections must belong to the same database, otherwise an Invalid Argument Exception will be thrown.

    If one of the collections is removed during the replication, the listener would be stopped, and the connections to the connected clients would be closed with an error - Need to sync the behavior and error code with SG.

    Declaration

    Swift

    public init(collections: [Collection])
  • Initializes a ListenerConfiguration’s builder with the given configuration object.

    Declaration

    Swift

    public init(config: URLEndpointListenerConfiguration)

    Parameters

    config

    The configuration object.

  • [0] No port specified, the OS will assign one

    Declaration

    Swift

    static let defaultPort: UInt16
  • [false] TLS is enabled on the connection

    Declaration

    Swift

    static let defaultDisableTls: Bool
  • [false] The listener will allow database writes

    Declaration

    Swift

    static let defaultReadOnly: Bool
  • [false] Delta sync is disabled for the listener

    Declaration

    Swift

    static let defaultEnableDeltaSync: Bool