Пример #1
0
        public void SendNetData(int id, byte[] buffer)
        {
            mNetPackage.command = id;
            mNetPackage.buffer  = buffer;
            ArraySegment <byte> stream = NetEncryptionStream.Encryption(mNetPackage);

            mWaitSendBuffer.WriteFrom(stream.Array, stream.Offset, stream.Count);
        }
        private bool GetPackage()
        {
            if (mParseStreamList.Length <= 0)
            {
                return(false);
            }

            bool bSucccess = NetEncryptionStream.DeEncryption(mParseStreamList, mBindReceiveNetPackage.bindData);

            if (bSucccess)
            {
                mBindReceiveNetPackage.DispatchEvent();
            }

            return(bSucccess);
        }