public void ReleaseRecvData(RecvData rcv)
 {
     lock (this)
     {
         mRecvDataPool.Add(rcv);
     }
 }
        public unsafe bool ParsePackage(byte *pData, UInt32 length, FOnPacketOK onPacket, PkgPoolManager parameter)
        {
            lock (this)
            {
                //int whileCount = 0;
                while (true)
                {
                    //++whileCount;
                    //if (whileCount >= 2)
                    //{
                    //    Log.FileLog.WriteLine($"ParsePackage whileCount = {whileCount}");
                    //}

                    if (length == 0)
                    {
                        return(true);
                    }
                    unsafe
                    {
                        //包头还没有读出来,不知道长度
                        if (PacketSize == 0)
                        {
                            if (CurPos + length < PacketHeadSize)
                            {//加上新读取的都还没有完成包头
                                AppendData(pData, length, ref length);
                                return(true);
                            }
                            else
                            {
                                var remainHead = PacketHeadSize - CurPos;
                                pData = AppendData(pData, remainHead, ref length);
                                fixed(byte *pBuffer = &mDataBuffer[0])
                                {
                                    PacketSize = ((PkgHeader *)pBuffer)->PackageSize;
                                }
                            }
                        }

                        if (PacketSize == 0 || PacketSize >= UInt16.MaxValue)
                        {//被修改或者错误的包
                            return(false);
                        }

                        if (CurPos + length < PacketSize)
                        {//还不够
                            AppendData(pData, length, ref length);
                            return(true);
                        }
                        else
                        {
                            //if (PacketSize == 0)
                            //    return false;
                            pData = AppendData(pData, PacketSize - CurPos, ref length);
                            //int pkgLength = (int)PacketSize;

                            #region CreateFullPacket
                            var pkg = RecvData.CreateData(parameter, mDataBuffer, (int)PacketSize);
                            CurPos     = 0;
                            PacketSize = 0;
                            #endregion

                            onPacket(pkg);
                            //return ParsePackage(pData, length, onPacket, parameter);
                        }
                    }
                }
            }
        }