WebSocketConfig class
Configuration class for WebSocket connections
Constructors
-
WebSocketConfig.new({required String url, List<
String> ? protocols, Map<String, String> ? headers, Duration? pingInterval, Duration connectionTimeout = const Duration(seconds: 10), Duration reconnectDelay = const Duration(seconds: 5), int maxReconnectAttempts = 3, bool autoReconnect = true, bool enableLogging = false, bool enableHeartbeat = true, Duration heartbeatInterval = const Duration(seconds: 30), Duration heartbeatTimeout = const Duration(seconds: 10), String heartbeatMessage = 'ping', String? expectedPongMessage, int maxMissedHeartbeats = 3, bool useExponentialBackoff = true, Duration maxReconnectDelay = const Duration(minutes: 5), double backoffMultiplier = 2.0, HttpClient? httpClient}) -
const
Properties
- autoReconnect → bool
-
final
- backoffMultiplier → double
-
final
- connectionTimeout → Duration
-
final
- enableHeartbeat → bool
-
final
- enableLogging → bool
-
final
- expectedPongMessage → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
final
- heartbeatInterval → Duration
-
final
- heartbeatMessage → String
-
final
- heartbeatTimeout → Duration
-
final
- httpClient → HttpClient?
-
final
- maxMissedHeartbeats → int
-
final
- maxReconnectAttempts → int
-
final
- maxReconnectDelay → Duration
-
final
- pingInterval → Duration?
-
final
-
protocols
→ List<
String> ? -
final
- reconnectDelay → Duration
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
final
- useExponentialBackoff → bool
-
final
Methods
-
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, int? maxMissedHeartbeats, bool? useExponentialBackoff, Duration? maxReconnectDelay, double? backoffMultiplier, HttpClient? httpClient}) → WebSocketConfig - Creates a copy of this config with updated values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited