cleanup qnetworkclient/qnetworkconnection

This commit is contained in:
Mister_Nebula 2021-08-29 16:45:35 +01:00
parent 6e964512db
commit 979fe21e9b
2 changed files with 0 additions and 48 deletions

View File

@ -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<short, QNetworkConnection.PacketStat> GetConnectionStats() =>
m_Connection?.PacketStats;

View File

@ -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}";