public void Process(NetworkIncomingMessageHandler handler, int count)
        {
            if (listener.IsAvailable(identifier))
            {
                if (count > 0)
                {
                    if (offset + length >= memory.Length)
                    {
                        Decrypt(offset + length - memory.Length, count);
                    }
                    else
                    {
                        Decrypt(offset + length, count);
                    }

                    length += count;
                    handler.OnMessage(new NetworkIncomingBufferMessage(this));
                }
                else
                {
                    listener.Disconnect(identifier);
                    handler.OnDisconnected();
                }
            }
        }
Exemple #2
0
 public void Execute(NetworkPoolInstance context, NetworkPoolTaskCallback callback)
 {
     handler.OnMessage(message);
 }