WebSocketMetrics class final

WebSocket metrics.

Annotations
  • @immutable

Constructors

WebSocketMetrics({required DateTime timestamp, required WebSocketReadyState readyState, required Duration reconnectTimeout, required BigInt transferredSize, required BigInt receivedSize, required BigInt transferredCount, required BigInt receivedCount, required ({int successful, int total}) reconnects, required DateTime? lastSuccessfulConnectionTime, required int disconnects, required DateTime? lastDisconnectTime, required DateTime? expectedReconnectTime, required ({int? code, String? reason}) lastDisconnect, required String? lastUrl})
WebSocket metrics.
const
WebSocketMetrics.fromJson(Map<String, Object?> json)
Create WebSocket metrics from JSON Object WebSocket metrics.
factory

Properties

disconnects int
The total number of times the connection has been disconnected.
final
expectedReconnectTime DateTime?
The time of the next expected reconnect.
final
hashCode int
The hash code for this object.
no setteroverride
lastDisconnect → ({int? code, String? reason})
The last disconnect reason.
final
lastDisconnectTime DateTime?
The time of the last disconnect.
final
lastSuccessfulConnectionTime DateTime?
The time of the last successful connection.
final
lastUrl String?
The last URL used to connect.
final
readyState WebSocketReadyState
The current state of the connection.
final
receivedCount BigInt
The total number of messages received.
final
receivedSize BigInt
The total number of bytes received.
final
reconnects → ({int successful, int total})
The total number of times the connection has been re-established.
final
reconnectTimeout Duration
Timeout between reconnection attempts.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
Timestamp of the metrics.
final
transferredCount BigInt
The total number of messages sent.
final
transferredSize BigInt
The total number of bytes sent.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
Convert WebSocket metrics to JSON Object
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override