WebSocketManager constructor

WebSocketManager({
  1. required WebSocketConfig config,
  2. ReconnectionStrategy? reconnectionStrategy,
  3. MessageQueue? messageQueue,
})

Creates a new WebSocketManager.

Implementation

WebSocketManager({
  required this.config,
  ReconnectionStrategy? reconnectionStrategy,
  MessageQueue? messageQueue,
}) : _reconnectionStrategy =
         reconnectionStrategy ??
         ReconnectionStrategyFactory.create(
           type: config.enableReconnection
               ? ReconnectionStrategyType.exponential
               : ReconnectionStrategyType.none,
           initialDelay: config.initialReconnectionDelay,
           maxDelay: config.maxReconnectionDelay,
         ),
     _messageQueue =
         messageQueue ??
         MessageQueue(
           maxSize: config.maxQueueSize,
           enablePriority: config.enableMessageQueue,
           enableDeduplication: config.enableMessageQueue,
         );