The time (in milliseconds) to wait before reconnecting to a server after a failed connection. The default value is 200 ms.
The maximum time (milliseconds) to allow reconnect attempts to continue without a successful connection, before giving up and abandoning the connection attempt. If zero, the client never gives up. The default value is 0.
The object with delay parameters, such as delay and maximumRetryTime.
This method returns the time (in milliseconds) that the client should delay before connecting to the given server URI.
The URI of the server.
The time (in milliseconds) that the client should delay.
This method resets the state of this reconnect delay. AMPS calls this method when a connection is established.
FixedDelayStrategy is a reconnect delay strategy implementation that waits a fixed amount of time before retrying a connection.
// create the fixed strategy with all default values var strategy = new amps.FixedDelayStrategy(); // set the maximum retry time to 15 seconds, leave the default delay value var strategy = new amps.FixedDelayStrategy({maximumRetryTime: 15000}); // set all params as arguments... var strategy = new amps.FixedDelayStrategy(2000, 45000); // ... or using the object with values var strategy = new amps.FixedDelayStrategy({ delay: 2000, maximumRetryTime: 45000 });