mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 03:28:26 +00:00
QNetworkReader
This commit is contained in:
parent
8f148c5666
commit
a32e510c55
@ -16,14 +16,14 @@ namespace QuantumUNET
|
||||
public QNetworkClient()
|
||||
{
|
||||
m_MsgBuffer = new byte[65535];
|
||||
m_MsgReader = new NetworkReader(m_MsgBuffer);
|
||||
m_MsgReader = new QNetworkReader(m_MsgBuffer);
|
||||
AddClient(this);
|
||||
}
|
||||
|
||||
public QNetworkClient(QNetworkConnection conn)
|
||||
{
|
||||
m_MsgBuffer = new byte[65535];
|
||||
m_MsgReader = new NetworkReader(m_MsgBuffer);
|
||||
m_MsgReader = new QNetworkReader(m_MsgBuffer);
|
||||
AddClient(this);
|
||||
SetActive(true);
|
||||
m_Connection = conn;
|
||||
@ -60,7 +60,7 @@ namespace QuantumUNET
|
||||
private readonly QNetworkMessageHandlers m_MessageHandlers = new();
|
||||
protected QNetworkConnection m_Connection;
|
||||
private readonly byte[] m_MsgBuffer;
|
||||
private readonly NetworkReader m_MsgReader;
|
||||
private readonly QNetworkReader m_MsgReader;
|
||||
protected ConnectState m_AsyncConnect = ConnectState.None;
|
||||
private string m_RequestedServerHost = "";
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace QuantumUNET
|
||||
public ReadOnlyCollection<QNetworkConnection> connections { get; }
|
||||
public Dictionary<short, QNetworkMessageDelegate> handlers => m_MessageHandlers.GetHandlers();
|
||||
public byte[] messageBuffer { get; private set; }
|
||||
public NetworkReader messageReader { get; private set; }
|
||||
public QNetworkReader messageReader { get; private set; }
|
||||
public Type networkConnectionClass { get; private set; } = typeof(QNetworkConnection);
|
||||
|
||||
public void SetNetworkConnectionClass<T>()
|
||||
@ -32,7 +32,7 @@ namespace QuantumUNET
|
||||
m_Initialized = true;
|
||||
NetworkTransport.Init();
|
||||
messageBuffer = new byte[65535];
|
||||
messageReader = new NetworkReader(messageBuffer);
|
||||
messageReader = new QNetworkReader(messageBuffer);
|
||||
if (hostTopology == null)
|
||||
{
|
||||
var connectionConfig = new ConnectionConfig();
|
||||
|
Loading…
Reference in New Issue
Block a user