From 524454a18d1baed0594101c0e0795d51f9120fd2 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:42:20 +0100 Subject: [PATCH] cleanup qulocalconnectiontoserver/client --- QuantumUNET/QULocalConnectionToClient.cs | 14 ----------- QuantumUNET/QULocalConnectionToServer.cs | 30 +++++++----------------- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/QuantumUNET/QULocalConnectionToClient.cs b/QuantumUNET/QULocalConnectionToClient.cs index 331851c0..adb8368d 100644 --- a/QuantumUNET/QULocalConnectionToClient.cs +++ b/QuantumUNET/QULocalConnectionToClient.cs @@ -42,19 +42,5 @@ namespace QuantumUNET LocalClient.InvokeBytesOnClient(writer.AsArray(), channelId); return true; } - - public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) - { - numMsgs = 0; - numBufferedMsgs = 0; - numBytes = 0; - lastBufferedPerSecond = 0; - } - - public override void GetStatsIn(out int numMsgs, out int numBytes) - { - numMsgs = 0; - numBytes = 0; - } } } \ No newline at end of file diff --git a/QuantumUNET/QULocalConnectionToServer.cs b/QuantumUNET/QULocalConnectionToServer.cs index d845a1e8..7b991ad0 100644 --- a/QuantumUNET/QULocalConnectionToServer.cs +++ b/QuantumUNET/QULocalConnectionToServer.cs @@ -12,14 +12,14 @@ namespace QuantumUNET m_LocalServer = localServer; } - public override bool Send(short msgType, QMessageBase msg) => - m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 0); + public override bool Send(short msgType, QMessageBase msg) + => m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 0); - public override bool SendUnreliable(short msgType, QMessageBase msg) => - m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 1); + public override bool SendUnreliable(short msgType, QMessageBase msg) + => m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, 1); - public override bool SendByChannel(short msgType, QMessageBase msg, int channelId) => - m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, channelId); + public override bool SendByChannel(short msgType, QMessageBase msg, int channelId) + => m_LocalServer.InvokeHandlerOnServer(this, msgType, msg, channelId); public override bool SendBytes(byte[] bytes, int numBytes, int channelId) { @@ -37,22 +37,8 @@ namespace QuantumUNET return result; } - public override bool SendWriter(QNetworkWriter writer, int channelId) => - m_LocalServer.InvokeBytes(this, writer.AsArray(), (short)writer.AsArray().Length, channelId); - - public override void GetStatsOut(out int numMsgs, out int numBufferedMsgs, out int numBytes, out int lastBufferedPerSecond) - { - numMsgs = 0; - numBufferedMsgs = 0; - numBytes = 0; - lastBufferedPerSecond = 0; - } - - public override void GetStatsIn(out int numMsgs, out int numBytes) - { - numMsgs = 0; - numBytes = 0; - } + public override bool SendWriter(QNetworkWriter writer, int channelId) + => m_LocalServer.InvokeBytes(this, writer.AsArray(), (short)writer.AsArray().Length, channelId); private readonly QNetworkServer m_LocalServer; }