RLMSyncTimeoutOptions
@interface 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 (assign, readwrite, nonatomic) NSUInteger connectTimeout;
-
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 (assign, readwrite, nonatomic) NSUInteger connectionLingerTime;
-
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 (assign, readwrite, nonatomic) NSUInteger pingKeepalivePeriod;
-
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 (assign, readwrite, nonatomic) NSUInteger pongKeepaliveTimeout;
-
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 (assign, readwrite, nonatomic) NSUInteger fastReconnectLimit;