WebSocketMetrics class final Client Entity

WebSocket metrics.

Annotations
  • @immutable

Constructors

WebSocketMetrics({required DateTime timestamp, required WebSocketReadyState readyState, required DateTime? nextReconnectionAttempt, 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 ({int? code, String? reason}) lastDisconnect, required bool isReconnectionActive, required int currentReconnectAttempts, required String? lastUrl})
WebSocket metrics.
const
WebSocketMetrics.fromJson(Map<String, Object?> json)
Create WebSocket metrics from JSON Object WebSocket metrics.
factory

Properties

currentReconnectAttempts int
The current number of reconnection attempts.
final
disconnects int
The total number of times the connection has been disconnected.
final
hashCode int
The hash code for this object.
no setteroverride
isReconnectionActive bool
Is the client currently planning to reconnect?
final
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
nextReconnectionAttempt DateTime?
The time of the next expected reconnect.
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
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