RLMSyncTimeoutOptions

Objective-C

@interface RLMSyncTimeoutOptions : NSObject

Swift

class RLMSyncTimeoutOptions : NSObject

Options for configuring timeouts and intervals in the sync client.

  • The maximum number of milliseconds to allow for a connection to become fully established. This includes the time to resolve the network address, the TCP connect operation, the SSL handshake, and the WebSocket handshake.

    Defaults to 2 minutes.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger connectTimeout;

    Swift

    var connectTimeout: UInt { get set }
  • The number of milliseconds to keep a connection open after all sessions have been abandoned.

    After all synchronized Realms have been closed for a given server, the connection is kept open until the linger time has expire to avoid the overhead of reestablishing the connection when Realms are being closed and reopened.

    Defaults to 30 seconds.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger connectionLingerTime;

    Swift

    var connectionLingerTime: UInt { get set }
  • The number of milliseconds between each heartbeat ping message.

    The client periodically sends ping messages to the server to check if the connection is still alive. Shorter periods make connection state change notifications more responsive at the cost of battery life (as the antenna will have to wake up more often).

    Defaults to 1 minute.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger pingKeepalivePeriod;

    Swift

    var pingKeepalivePeriod: UInt { get set }
  • How long in milliseconds to wait for a reponse to a heartbeat ping before concluding that the connection has dropped.

    Shorter values will make connection state change notifications more responsive as it will only change to disconnected after this much time has elapsed, but overly short values may result in spurious disconnection notifications when the server is simply taking a long time to respond.

    Defaults to 2 minutes.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger pongKeepaliveTimeout;

    Swift

    var pongKeepaliveTimeout: UInt { get set }
  • The maximum amount of time, in milliseconds, since the loss of a prior connection, for a new connection to be considered a “fast reconnect”.

    When a client first connects to the server, it defers uploading any local changes until it has downloaded all changesets from the server. This typically reduces the total amount of merging that has to be done, and is particularly beneficial the first time that a specific client ever connects to the server.

    When an existing client disconnects and then reconnects within the “fact reconnect” time this is skipped and any local changes are uploaded immediately without waiting for downloads, just as if the client was online the whole time.

    Defaults to 1 minute.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger fastReconnectLimit;

    Swift

    var fastReconnectLimit: UInt { get set }
  • The app configuration that has initialized this SyncManager. This can be set multiple times. This gives the SyncManager access to necessary app functionality.

    Declaration

    Objective-C

    @property (nonatomic, readonly) RLMAppConfiguration *_Nonnull appConfiguration;

    Swift

    var appConfiguration: RLMAppConfiguration { get }