From 979fe21e9b9ad219d1d1dae863ce560deb62736a Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:45:35 +0100 Subject: [PATCH] cleanup qnetworkclient/qnetworkconnection --- QuantumUNET/QNetworkClient.cs | 22 ---------------------- QuantumUNET/QNetworkConnection.cs | 26 -------------------------- 2 files changed, 48 deletions(-) diff --git a/QuantumUNET/QNetworkClient.cs b/QuantumUNET/QNetworkClient.cs index 42cac309..292b84f1 100644 --- a/QuantumUNET/QNetworkClient.cs +++ b/QuantumUNET/QNetworkClient.cs @@ -509,28 +509,6 @@ namespace QuantumUNET } } - public void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) - { - numMsgs = 0; - numBufferedMsgs = 0; - numBytes = 0; - lastBufferedPerSecond = 0; - if (m_Connection != null) - { - m_Connection.GetStatsOut(out numMsgs, out numBufferedMsgs, out numBytes, out lastBufferedPerSecond); - } - } - - public void GetStatsIn(out int numMsgs, out int numBytes) - { - numMsgs = 0; - numBytes = 0; - if (m_Connection != null) - { - m_Connection.GetStatsIn(out numMsgs, out numBytes); - } - } - public Dictionary GetConnectionStats() => m_Connection?.PacketStats; diff --git a/QuantumUNET/QNetworkConnection.cs b/QuantumUNET/QNetworkConnection.cs index 3d0c915d..a7cbfaa2 100644 --- a/QuantumUNET/QNetworkConnection.cs +++ b/QuantumUNET/QNetworkConnection.cs @@ -350,32 +350,6 @@ namespace QuantumUNET } } - public virtual void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) - { - numMsgs = 0; - numBufferedMsgs = 0; - numBytes = 0; - lastBufferedPerSecond = 0; - foreach (var channelBuffer in m_Channels) - { - numMsgs += channelBuffer.NumMsgsOut; - numBufferedMsgs += channelBuffer.NumBufferedMsgsOut; - numBytes += channelBuffer.NumBytesOut; - lastBufferedPerSecond += channelBuffer.LastBufferedPerSecond; - } - } - - public virtual void GetStatsIn(out int numMsgs, out int numBytes) - { - numMsgs = 0; - numBytes = 0; - foreach (var channelBuffer in m_Channels) - { - numMsgs += channelBuffer.NumMsgsIn; - numBytes += channelBuffer.NumBytesIn; - } - } - public override string ToString() => $"hostId: {hostId} connectionId: {connectionId} isReady: {isReady} channel count: {m_Channels?.Length ?? 0}";