Exemplo n.º 1
0
        private void MessageReceived(object sender, IoSessionMessageEventArgs e)
        {
            byte[]           data    = (byte[])e.Message;
            PacketDecoderNew decoder = new PacketDecoderNew(data);

            if (!decoder.Available())
            {
                return;
            }
            ClientPacketProcessor.Instance.DelegateHandler(decoder.GetPacket());
            decoder.Dispose();
        }
Exemplo n.º 2
0
        private void MessageReceived(object sender, IoSessionMessageEventArgs e)
        {
            byte[]           data    = (byte[])e.Message;
            PacketDecoderNew decoder = new PacketDecoderNew(data);

            if (!decoder.Available())
            {
                return;
            }
            ClientObject client = (ClientObject)e.Session.GetAttribute(SERVER_KEY);

            ServerPacketProcessor.Instance.DelegateHandler(client, decoder.GetPacket());
            decoder.Dispose();
        }