copyWith method

WebSocketConfig copyWith({
  1. String? url,
  2. List<String>? protocols,
  3. Map<String, String>? headers,
  4. Duration? pingInterval,
  5. Duration? connectionTimeout,
  6. Duration? reconnectDelay,
  7. int? maxReconnectAttempts,
  8. bool? autoReconnect,
  9. bool? enableLogging,
  10. bool? enableHeartbeat,
  11. Duration? heartbeatInterval,
  12. Duration? heartbeatTimeout,
  13. String? heartbeatMessage,
  14. String? expectedPongMessage,
  15. RegExp? expectedPongMessagePattern,
  16. int? maxMissedHeartbeats,
  17. bool? useExponentialBackoff,
  18. Duration? maxReconnectDelay,
  19. double? backoffMultiplier,
  20. Object? httpClient,
  21. bool? enableMessageQueue,
  22. int? maxQueueSize,
  23. Duration? messageQueueTimeout,
  24. bool? enableAck,
  25. Duration? ackTimeout,
  26. int? maxAckRetries,
})

Implementation

WebSocketConfig copyWith({
  String? url,
  List<String>? protocols,
  Map<String, String>? headers,
  Duration? pingInterval,
  Duration? connectionTimeout,
  Duration? reconnectDelay,
  int? maxReconnectAttempts,
  bool? autoReconnect,
  bool? enableLogging,
  bool? enableHeartbeat,
  Duration? heartbeatInterval,
  Duration? heartbeatTimeout,
  String? heartbeatMessage,
  String? expectedPongMessage,
  RegExp? expectedPongMessagePattern,
  int? maxMissedHeartbeats,
  bool? useExponentialBackoff,
  Duration? maxReconnectDelay,
  double? backoffMultiplier,
  Object? httpClient,
  bool? enableMessageQueue,
  int? maxQueueSize,
  Duration? messageQueueTimeout,
  bool? enableAck,
  Duration? ackTimeout,
  int? maxAckRetries,
}) {
  return WebSocketConfig(
    url: url ?? this.url,
    protocols: protocols ?? this.protocols,
    headers: headers ?? this.headers,
    pingInterval: pingInterval ?? this.pingInterval,
    connectionTimeout: connectionTimeout ?? this.connectionTimeout,
    reconnectDelay: reconnectDelay ?? this.reconnectDelay,
    maxReconnectAttempts: maxReconnectAttempts ?? this.maxReconnectAttempts,
    autoReconnect: autoReconnect ?? this.autoReconnect,
    enableLogging: enableLogging ?? this.enableLogging,
    enableHeartbeat: enableHeartbeat ?? this.enableHeartbeat,
    heartbeatInterval: heartbeatInterval ?? this.heartbeatInterval,
    heartbeatTimeout: heartbeatTimeout ?? this.heartbeatTimeout,
    heartbeatMessage: heartbeatMessage ?? this.heartbeatMessage,
    expectedPongMessage: expectedPongMessage ?? this.expectedPongMessage,
    expectedPongMessagePattern:
        expectedPongMessagePattern ?? this.expectedPongMessagePattern,
    maxMissedHeartbeats: maxMissedHeartbeats ?? this.maxMissedHeartbeats,
    useExponentialBackoff:
        useExponentialBackoff ?? this.useExponentialBackoff,
    maxReconnectDelay: maxReconnectDelay ?? this.maxReconnectDelay,
    backoffMultiplier: backoffMultiplier ?? this.backoffMultiplier,
    httpClient: httpClient ?? this.httpClient,
    enableMessageQueue: enableMessageQueue ?? this.enableMessageQueue,
    maxQueueSize: maxQueueSize ?? this.maxQueueSize,
    messageQueueTimeout: messageQueueTimeout ?? this.messageQueueTimeout,
    enableAck: enableAck ?? this.enableAck,
    ackTimeout: ackTimeout ?? this.ackTimeout,
    maxAckRetries: maxAckRetries ?? this.maxAckRetries,
  );
}