setAutoReconnect method

void setAutoReconnect(
  1. bool enabled, {
  2. int maxAttempts = 5,
  3. int delay = 1000,
})

Set auto-reconnect settings

Implementation

void setAutoReconnect(bool enabled, {int maxAttempts = 5, int delay = 1000}) {
  _autoReconnect = enabled;
  _maxReconnectAttempts = maxAttempts;
  _reconnectDelay = delay;
}