public ServerTransport() { m_Dispose = false; m_Socket = null; m_Listener = null; m_Process = new ServerDataProcessing(); m_Channels = new ConcurrentDictionary <uint, ServerChannel>(); }
internal void OnUpdate(long time, ServerDataProcessing process, IChannelListener listener) { if (m_Dispose) { return; } process.SendPackets(this, m_SendPackets); m_Con.OnUpdate(time); m_Heartbeat.OnUpdate(this, listener); }
internal void RecvUnreliablePackets(byte[] rawBuffer, int offset, int count, ServerDataProcessing process, List <Packet> packets) { if (m_Dispose) { return; } if (process.RecvUnreliablePackets(rawBuffer, offset, count, packets)) { HandlePackets(packets); } }
internal void RecvReliablePackets(ServerDataProcessing process, List <Packet> packets, IChannelListener listener) { if (m_Dispose) { return; } if (process.RecvReliablePackets(this, packets, listener, m_Heartbeat)) { HandlePackets(packets); } }