Options that configure the connection strategy.
The maximum time in seconds to wait for a successful connection request to be completed. The default value is 10 seconds.
The maximum time in seconds to wait for a successful web socket connection to be made. The default value is 5 seconds.
Configures the model subsystem.
Configure how data is handled within models.
Determines what happens when data is supplied that contains an array that contains undefined at one or more indices. If set to "error" (the default) the client will throw an error if if it detects an undefined value within an array. If set to "null", the value will be converted to null.
Determines what happens when data is supplied to an object that contains a property with a value of undefined. If set to "error" (the default) the client will throw an error if if it detects an undefined value in an object. If set to "omit", the property will simply be omitted from the resultant RealTimeObject.
Configures offline storage for Convergence. Several of these options are required to enable offline editing of data.
The number of operations after which a snapshot of local offline that is being edited should be taken. The default is 100.
The storage adapter to use for offline storage.
Configures the behavior of the messaging protocol subsystem.
The timeout for a request to the server, in seconds. The default value is 10 seconds.
Configures the keep-alive heartbeat.
Determines if the heartbeat is enabled.
Configures how long the client will wait, in seconds after the last message is received from the server before a ping will be sent. The default value is 5 seconds.
Specifies the time in seconds the client will wait for a response from the server to a ping before considering the connection dead. The default value is 10 seconds.
Options that configure how Convergence will reconnect when an established connection is lost unexpectedly or when the intial connection fails.
Whether to automatically reconnect when the connection is unexpectedly dropped. Note this setting only applies to connections that have succeeded and then were lost. This setting does not apply to the initial connection, or the first connection made after disconnect is called on the domain. Default is true.
Whether to automatically reconnect if the initial connection fails. Setting this to false will prevent Convergence from reconnecting automatically if the initial connection (as requested by directly calling one of the connect methods), but will still allow Convergence to reconnect if it was disconnected unintentionally after the first connection was made. Note that if a connection is successful, and then disconnect is called, the subsequent call to connect will be treated as an initial connection. Default is true.
The fallbackAuth method to use when a reconnect token is rejected. It provides the opportunity to use a fallback method of authentication.
options.reconnect.fallbackAuth = (authChallenge:IFallbackAuthChallenge) => {
return YourAuthenticationService.getNewJwt().then(jwt => {
authChallenge.jwt(jwt);
})
};
The intervals to use between reconnects. This array will be sorted from smallest to largest. When the largest interval is reached it will simply be repeated.
Options that configure how Convergence will use WebSockets.
See the Node.js Usage section on [this page] for an example of these parameters in action.
The constructor to use when creating a web socket. Essentially this is class that should be used to represent the web socket.
Defines the class / constructor that should be used to create WebSocket objects. This is useful when operating in NodeJS where a library like ws or isomorphic-ws can be used to provide a client side WebSocket API.
The IConvergenceOptions interface represents that options that can be set within Convergence when connecting to a domain.
See the ConvergenceOptions implementation for the default settings.