mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
cleanup qnetworkclient/qnetworkconnection
This commit is contained in:
parent
6e964512db
commit
979fe21e9b
@ -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;
|
||||
|
||||
|
@ -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}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user