WebSocketConfig.aggressive constructor

const WebSocketConfig.aggressive({
  1. required String url,
  2. Map<String, String> headers = const {},
  3. List<String> protocols = const [],
})

Creates a WebSocketConfig with aggressive reconnection settings.

Implementation

const WebSocketConfig.aggressive({
  required this.url,
  this.headers = const {},
  this.protocols = const [],
})  : connectionTimeout = const Duration(seconds: 15),
      enableReconnection = true,
      maxReconnectionAttempts = 20,
      initialReconnectionDelay = const Duration(milliseconds: 500),
      maxReconnectionDelay = const Duration(minutes: 2),
      backoffMultiplier = 1.5,
      enableMessageQueue = true,
      maxQueueSize = 2000,
      heartbeatInterval = const Duration(seconds: 15),
      enableHeartbeat = true,
      enableCompression = false;