Beispiel #1
0
 public ServerTransport()
 {
     m_Dispose  = false;
     m_Socket   = null;
     m_Listener = null;
     m_Process  = new ServerDataProcessing();
     m_Channels = new ConcurrentDictionary <uint, ServerChannel>();
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        internal void RecvReliablePackets(ServerDataProcessing process, List <Packet> packets, IChannelListener listener)
        {
            if (m_Dispose)
            {
                return;
            }

            if (process.RecvReliablePackets(this, packets, listener, m_Heartbeat))
            {
                HandlePackets(packets);
            }
        }