cleanup qulocalconnectiontoserver/client

This commit is contained in:
Mister_Nebula 2021-08-29 16:42:20 +01:00
parent 5c0ba4574b
commit 524454a18d
2 changed files with 8 additions and 36 deletions

View File

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

View File

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