public override void serialize(ByteBuffer bu)
 {
     base.serialize(bu);
     bu.writeMultiByte(strName, GkEncode.UTF8, ProtoCV.MAX_ACCNAMESIZE);
     bu.writeMultiByte(strPassword, GkEncode.UTF8, ProtoCV.MAX_PASSWORD);
     bu.writeMultiByte(strNewPassword, GkEncode.UTF8, ProtoCV.MAX_PASSWORD);
 }
Example #2
0
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);

            bu.writeUnsignedInt32(dwType);
            bu.writeUnsignedInt32(dwSysInfoType);
            bu.writeMultiByte(pstrName, GkEncode.UTF8, ProtoCV.MAX_NAMESIZE);
            bu.writeMultiByte(pstrChat, GkEncode.UTF8, ProtoCV.MAX_CHATINFO);
            bu.writeUnsignedInt32(dwFromID);
            bu.writeUnsignedInt32(dwChannelID);
        }
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);

            bu.writeUnsignedInt32(loginTempID);
            bu.writeUnsignedInt32(dwUserID);
            bu.writeMultiByte(pstrName, GkEncode.UTF8, ProtoCV.MAX_ACCNAMESIZE);
            bu.writeMultiByte(pstrPassword, GkEncode.UTF8, ProtoCV.MAX_PASSWORD);

            bu.writeUnsignedInt32(reserve);
            bu.writeUnsignedInt32(version);
        }
Example #4
0
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);
            bu.writeUnsignedInt32(reserve);
            bu.writeUnsignedInt32(version);

            bu.writeMultiByte(testStr, GkEncode.UTF8, 100);
        }
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);
            bu.writeMultiByte(strUserName, GkEncode.UTF8, ProtoCV.MAX_NAMESIZE + 1);
            bu.writeUnsignedInt16(gender);
            bu.writeUnsignedInt16(race);

            bu.writeUnsignedInt32(hair);
            bu.writeUnsignedInt32(face);

            bu.writeUnsignedInt16(career);
            bu.writeUnsignedInt32(country);

            bu.writeUnsignedInt8(height);
            bu.writeUnsignedInt8(weight);
        }
        public override void serialize(ByteBuffer bu)
        {
            base.serialize(bu);

            bu.writeMultiByte(pstrName, GkEncode.UTF8, ProtoCV.MAX_ACCNAMESIZE);
            bu.writeMultiByte(pstrPassword, GkEncode.UTF8, 33);
            bu.writeUnsignedInt16(game);
            bu.writeUnsignedInt16(zone);
            bu.writeMultiByte(jpegPassport, GkEncode.UTF8, 7);
            bu.writeMultiByte(mac_addr, GkEncode.UTF8, 13);
            bu.writeMultiByte(uuid, GkEncode.UTF8, 25);
            bu.writeUnsignedInt16(wdNetType);
            bu.writeMultiByte(passpodPwd, GkEncode.UTF8, 9);
        }
Example #7
0
 protected void testBA()
 {
     string str = "测试数据";
     ByteBuffer bu = new ByteBuffer();
     bu.writeMultiByte(str, GkEncode.UTF8, 24);
     bu.position = 0;
     string ret = "";
     bu.readMultiByte(ref ret, 24, GkEncode.UTF8);
 }
Example #8
0
        protected void testLuaByteBuffer()
        {
            ByteBuffer bu = new ByteBuffer();
            bu.luaCSBridgeByteBuffer = new LuaCSBridgeByteBuffer();

            bu.writeInt16(257);
            bu.writeInt32(2147483647);
            bu.writeInt16(-86);
            bu.writeMultiByte("asdfasdf", GkEncode.UTF8, 16);
            bu.writeMultiByte("测试啊", GkEncode.UTF8, 16);
            //bu.luaCSBridgeByteBuffer.CallClassMethod("tableFunc");
            bu.luaCSBridgeByteBuffer.updateLuaByteBuffer(bu);
            bu.luaCSBridgeByteBuffer.CallClassMethod("TestOut");
            //bu.luaCSBridgeByteBuffer.CallClassMethod("dumpAllBytes");

            object _int16 = bu.luaCSBridgeByteBuffer.CallClassMethod("readInt16FromCS");
            object _int32 = bu.luaCSBridgeByteBuffer.CallClassMethod("readInt32FromCS");
            object _int16Neg = bu.luaCSBridgeByteBuffer.CallClassMethod("readInt16FromCS");
            object _strEn = bu.luaCSBridgeByteBuffer.CallClassMethod("readMultiByteFromCS");
            object _strChs = bu.luaCSBridgeByteBuffer.CallClassMethod("readMultiByteFromCS");
            int aaa = 0;
        }