Ejemplo n.º 1
0
        public void SendNetData(int id, byte[] buffer)
        {
            mNetPackage.command = id;
            mNetPackage.buffer  = buffer;
            ArraySegment <byte> stream = NetEncryptionStream.Encryption(mNetPackage);

            this.SendNetStream(stream.Array, stream.Offset, stream.Count);
        }
Ejemplo n.º 2
0
        private bool GetPackage()
        {
            if (mParseStreamList.Length <= 0)
            {
                return(false);
            }

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

            if (bSucccess)
            {
                mBindReceieNetPackage.bindData.clientId = this.getId();
                mBindReceieNetPackage.DispatchEvent();
            }

            return(bSucccess);
        }
Ejemplo n.º 3
0
        private bool GetPackage()
        {
            if (mParseStreamList.Length <= 0)
            {
                return(false);
            }

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

            if (bSucccess)
            {
                mBindReceiveNetPackage.bindData.clientId = getId();
                mBindReceiveNetPackage.DispatchEvent();
            }
            else
            {
                DebugSystem.LogError("服务器端 解码失败");
            }

            return(bSucccess);
        }