当前位置: 首页>>代码示例>>C#>>正文


C# ByteBuffer.Put方法代码示例

本文整理汇总了C#中System.ByteBuffer.Put方法的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer.Put方法的具体用法?C# ByteBuffer.Put怎么用?C# ByteBuffer.Put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ByteBuffer的用法示例。


在下文中一共展示了ByteBuffer.Put方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put((byte)SubCommand);
     buf.PutInt(ClusterId);
     buf.Put((byte)0);
     buf.PutInt(0);
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:7,代码来源:ClusterUpdateOrganizationPacket.cs

示例2: PutBody

        protected override void PutBody(ByteBuffer buf)
        {
            // 初始密钥
            buf.PutChar((char)user.QQKey.LoginInfo_Magic_Token.Length);
            buf.Put(user.QQKey.LoginInfo_Magic_Token);
            ByteBuffer DecodedBuf = new ByteBuffer();
            DecodedBuf.PutChar((char)0x010D);
            DecodedBuf.Put(0x00);
            DecodedBuf.Put(new byte[] { 0x01, 0x01 });
            DecodedBuf.Put(VersionData.QQ09_LOCALE);
            DecodedBuf.Put(VersionData.QQ09_VERSION_SPEC);
            DecodedBuf.PutChar((char)Client.QQUser.QQKey.Answer_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.Answer_Token);

            DecodedBuf.PutChar((char)Client.QQUser.QQKey.LoginInfo_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_Token);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_UnknowData);
            DecodedBuf.Put(Client.ServerTime);

            DecodedBuf.PutChar((char)Client.QQUser.QQKey.LoginInfo_Data_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_Data_Token);
            DecodedBuf.PutChar((char)0x0000);
            DecodedBuf.PutInt(0x00000000);
            //Client.QQUser.QQKey.Key = Client.QQUser.QQKey.LoginInfo_Key1;//可能要用到
            byte[] EncodedBuf = crypter.Encrypt(DecodedBuf.ToByteArray(), user.QQKey.LoginInfo_Key1);
            buf.Put(EncodedBuf);
            #if DEBUG
            Client.LogManager.Log(ToString() + " key:" + Utils.Util.ToHex(user.QQKey.InitKey));
            Client.LogManager.Log(ToString() + " UnBody: " + Utils.Util.ToHex(DecodedBuf.ToByteArray()));
            #endif
        }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:31,代码来源:LoginGetInfoPacket.cs

示例3: PutBody

        protected override void PutBody(ByteBuffer buf)
        {
            // 初始密钥
            //buf.Put(user.QQKey.InitKey);
            buf.PutChar((char)user.QQKey.LoginInfo_Magic_Token.Length);
            buf.Put(user.QQKey.LoginInfo_Magic_Token);
            ByteBuffer DecodedBuf = new ByteBuffer();
            DecodedBuf.PutChar((char)0x0101);
            DecodedBuf.PutChar((char)0x0000);
            DecodedBuf.Put((byte)Client.QQUser.QQKey.LoginInfo_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_Token);

            DecodedBuf.Put(new byte[]{0x10,0x03,0xC8,0xEC,0xC8,0x96,
                0x8B,0xF2,0xB3,0x6B,0x4D,0x0C,0x5C,0xE0,0x6A,0x51,0xCE});//unknown data
            //Client.QQUser.QQKey.Key = Client.QQUser.QQKey.LoginInfo_Key1;//可能要用到
            byte[] EncodedBuf = crypter.Encrypt(DecodedBuf.ToByteArray(), user.QQKey.LoginInfo_Key1);
            #if DEBUG
            Client.LogManager.Log(ToString() + " key:" + Utils.Util.ToHex(user.QQKey.LoginInfo_Key1));
            Client.LogManager.Log(ToString() + " UnBody:" + Utils.Util.ToHex(DecodedBuf.ToByteArray()));
            #endif
            buf.Put(EncodedBuf);
            #if DEBUG
            Client.LogManager.Log(ToString() + " EnBody:" + Utils.Util.ToHex(buf.ToByteArray()));
            #endif
        }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:25,代码来源:LoginA4Packet.cs

示例4: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put((byte)SubCommand);
     buf.PutInt(ClusterId);
     buf.Put(Operation);
     foreach (int i in Members)
         buf.PutInt(i);
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:8,代码来源:ClusterModifyMemberPacket.cs

示例5: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put(0x88);
     buf.PutInt(Client.QQUser.QQ);
     buf.Put(0x00);
     #if DEBUG
     Client.LogManager.Log(ToString() + " " + Utils.Util.ToHex(buf.ToByteArray()));
     #endif
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:9,代码来源:GetLevelPacket.cs

示例6: PutBody

 /// <summary>
 /// 初始化包体
 /// </summary>
 /// <param name="buf">The buf.</param>
 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put((byte)0x1F);
     buf.Put((byte)0x01);
     buf.PutInt(BeginFrom);
     #if DEBUG
     Client.LogManager.Log(ToString() + " " + Utils.Util.ToHex(buf.ToByteArray()));
     #endif
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:13,代码来源:DownloadGroupFriendPacket.cs

示例7: GetBytes

 /// <summary>
 /// 将serverInfo转成byte[]
 /// </summary>
 /// <returns></returns>
 public byte[] GetBytes()
 {
     ByteBuffer buf = new ByteBuffer();
     buf.Put(CSP_wRedirectCount);
     buf.Put(CSP_cRedirectCount);
     buf.Put(CSP_dwConnIspID);
     buf.Put(CSP_dwServerReserve);
     buf.Put(CSP_dwConnIP);
     return buf.ToByteArray();
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:14,代码来源:ServerInfo.cs

示例8: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     // 命令类型
     buf.Put((byte)SubCommand);
     // 类型
     buf.Put((byte)Type);
     // 内部ID
     buf.PutInt(ParentClusterId);
     // 外部ID
     buf.PutInt(ClusterId);
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:11,代码来源:ClusterGetTempInfoPacket.cs

示例9: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put(0x01);
     buf.PutInt(0);
     buf.PutInt(0);
     buf.Put(0x02);
     buf.PutUShort(StartPosition);
     buf.Put(0);
     #if DEBUG
     Client.LogManager.Log(ToString() + " " + Utils.Util.ToHex(buf.ToByteArray()));
     #endif
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:12,代码来源:GetFriendListPacket.cs

示例10: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     // 命令类型
     buf.Put((byte)SubCommand);
     // 群类型
     buf.Put((byte)SearchType);
     // 内部ID
     if (SearchType == ClusterSearchType.Demo)
         buf.PutInt(0);
     else
         buf.PutInt(ExternalId);
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:12,代码来源:ClusterSearchPacket.cs

示例11: Read

 /// <summary>
 /// </summary>
 /// <param name="buf">The buf.</param>
 public void Read(ByteBuffer buf)
 {
     ByteBuffer temp = new ByteBuffer();
     int i = 0;
     while (true)
     {
         byte b = buf.Get();
         if (b != 0x1F)
         {
             if (b != 0x1E)
             {
                 temp.Put(b);
             }
             else
             {
                 if (i == 0)
                 {
                     QQ = Utils.Util.GetInt(Utils.Util.GetString(temp.ToByteArray()), 0000);
                 }
                 else if (i == 1)
                     Nick = Utils.Util.GetString(temp.ToByteArray());
                 else if (i == 2)
                     Province = Utils.Util.GetString(temp.ToByteArray());
                 i++;
                 temp.Initialize();
             }
         }
         else
         {
             Face = Utils.Util.GetInt(Utils.Util.GetString(temp.ToByteArray()), 0);
             break;
         }
     }
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:37,代码来源:UserInfo.cs

示例12: PutBody

        protected override void PutBody(ByteBuffer buf)
        {
            buf.PutChar((char)Client.QQUser.QQKey.LoginInfo_Magic_Token.Length);
            buf.Put(user.QQKey.LoginInfo_Magic_Token);
            ByteBuffer DecodedBuf = new ByteBuffer();
            DecodedBuf.PutChar((char)0x011A);
            DecodedBuf.PutChar((char)0x0001);
            DecodedBuf.Put(VersionData.QQ09_LOCALE);
            DecodedBuf.Put(VersionData.QQ09_VERSION_SPEC);
            DecodedBuf.Put((byte)0x00);
            DecodedBuf.Put((byte)Client.QQUser.QQKey.Answer_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.Answer_Token);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_UnknowData2);
            DecodedBuf.Put(Client.ServerTime);
            DecodedBuf.Put(Client.ClientIP);
            DecodedBuf.Position += 4;//00 00 00 00
            DecodedBuf.PutChar((char)Client.QQUser.QQKey.LoginInfo_Large_Token.Length);
            DecodedBuf.Put(Client.QQUser.QQKey.LoginInfo_Large_Token);
            DecodedBuf.PutUShort(this.Pos);
            DecodedBuf.Position += 2;// 00 00
            DecodedBuf.PutChar((char)0x0071);
            DecodedBuf.Position += 0x0070;//0x0071 zeros
            DecodedBuf.Put(0x00);

            byte[] EncodedBuf = crypter.Encrypt(DecodedBuf.ToByteArray(), user.QQKey.LoginInfo_Key1);
            #if DEBUG
            Client.LogManager.Log(ToString() + " QQKey.LoginInfo_Key1:" + Utils.Util.ToHex(user.QQKey.LoginInfo_Key1));
            Client.LogManager.Log(ToString() + " pos:"+this.Pos+" UnBody:" + Utils.Util.ToHex(DecodedBuf.ToByteArray()));
            #endif
            buf.Put(EncodedBuf);
            #if DEBUG
            Client.LogManager.Log(ToString() + " EnBody:" + Utils.Util.ToHex(buf.ToByteArray()));
            #endif
        }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:34,代码来源:LoginGetListPacket.cs

示例13: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     buf.Put(Reply);
     #if DEBUG
     Client.LogManager.Log(ToString() + " " + Utils.Util.ToHex(buf.ToByteArray()));
     #endif
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:7,代码来源:ReceiveIMReplyPacket.cs

示例14: PutBody

 protected override void PutBody(ByteBuffer buf)
 {
     // 命令类型
     buf.Put((byte)SubCommand);
     // 子命令
     buf.Put((byte)OpByte);
     switch (OpByte)
     {
         case ClusterSubCmd.GET_SUBJECT_LIST:
             buf.PutInt(ClusterId);
             break;
         case ClusterSubCmd.GET_DIALOG_LIST:
             buf.PutInt(0);
             break;
     }
 }
开发者ID:leaker,项目名称:fuhj-widgets,代码行数:16,代码来源:ClusterSubClusterOpPacket.cs

示例15: relPut

 private static void relPut(ByteBuffer b)
 {
     int n = b.Capacity;
     b.Clear();
     for (int i = 0; i < n; i++)
         b.Put((byte)Ic(i));
     b.Flip();
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:8,代码来源:TestByteBuffer.cs


注:本文中的System.ByteBuffer.Put方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。