Ejemplo n.º 1
0
        //数据解析
        public void parse()
        {
            byte packageLength = DataPro.getByte(m_buffer, ref m_postion);
            if ((packageLength + m_postion) <= m_endIndex)
            {
                Console.WriteLine("Complete Package");
                byte[] data = new byte[packageLength];
                DataPro.getByteArray(m_buffer, ref m_postion, data);

                ThreadMessage tm = new ThreadMessage();
                tm.data = data;
                tm.mc = m_cc;

                //推入线程池
                MyGlobal.mpool.addJob(tm);

                parse();
            }
            else
            {
                m_postion--;
            }
        }
Ejemplo n.º 2
0
        //数据解析
        public void parse()
        {
            byte packageLength = DataPro.getByte(m_buffer, ref m_postion);

            if ((packageLength + m_postion) <= m_endIndex)
            {
                Console.WriteLine("Complete Package");
                byte[] data = new byte[packageLength];
                DataPro.getByteArray(m_buffer, ref m_postion, data);

                ThreadMessage tm = new ThreadMessage();
                tm.data = data;
                tm.mc   = m_cc;

                //推入线程池
                MyGlobal.mpool.addJob(tm);

                parse();
            }
            else
            {
                m_postion--;
            }
        }