Пример #1
0
        private void process_one_packet(byte[] bytes, int offset, UInt32 body_len)
        {
            byte[] package = new byte[body_len];
            Array.Copy(bytes, offset, package, 0, body_len);

            ICoder coder = session.GetCoder();

            byte[] zip_bytes = null;
            if (coder.UnzipBody(package, out zip_bytes) == false)
            {
                close(false);
                return;
            }

            byte[] decode_bytes = null;
            coder.DecodeBody(zip_bytes, out decode_bytes);

            Event evt = new Event(EventType.ConnRecvMsgType, this, decode_bytes);

            net.PushEvent(evt);
        }