copyWith method
Creates a copy of this metrics object with updated values
Implementation
SocketConnectionMetrics copyWith({
int? intervalMs,
int? averageIntervalMs,
int? minIntervalMs,
int? maxIntervalMs,
int? jitterMs,
int? missedPings,
int? totalPings,
SocketConnectionQuality? quality,
int? timestamp,
int? lastPingTimestamp,
}) {
return SocketConnectionMetrics(
intervalMs: intervalMs ?? this.intervalMs,
averageIntervalMs: averageIntervalMs ?? this.averageIntervalMs,
minIntervalMs: minIntervalMs ?? this.minIntervalMs,
maxIntervalMs: maxIntervalMs ?? this.maxIntervalMs,
jitterMs: jitterMs ?? this.jitterMs,
missedPings: missedPings ?? this.missedPings,
totalPings: totalPings ?? this.totalPings,
quality: quality ?? this.quality,
timestamp: timestamp ?? this.timestamp,
lastPingTimestamp: lastPingTimestamp ?? this.lastPingTimestamp,
);
}