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


C# PacketReader.Skip方法代码示例

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


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

示例1: IS_ISM

 /// <summary>
 /// Creates a new InSim multiplayer packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_ISM(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     Host = (HostType)reader.ReadByte();
     reader.Skip(3);
     HName = reader.ReadString(32);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:15,代码来源:IS_ISM.cs

示例2: IS_III

 /// <summary>
 /// Creates a new InSim info packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_III(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     UCID = reader.ReadByte();
     PLID = reader.ReadByte();
     reader.Skip(2);
     Msg = reader.ReadString(64);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:16,代码来源:IS_III.cs

示例3: IS_ACR

 /// <summary>
 /// Creates a new <see cref="IS_ACR"/> object.
 /// </summary>
 /// <param name="buffer">The packet data.</param>
 public IS_ACR(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     UCID = reader.ReadByte();
     Admin = reader.ReadBoolean();
     Result = (AdminResult)reader.ReadByte();
     reader.Skip(1);
     Text = reader.ReadString(64);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:16,代码来源:IS_ACR.cs

示例4: IS_FIN

 /// <summary>
 /// Creates a new finished race notification packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_FIN(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     TTime = TimeSpan.FromMilliseconds(reader.ReadUInt32());
     BTime = TimeSpan.FromMilliseconds(reader.ReadUInt32());
     reader.Skip(1);
     NumStops = reader.ReadByte();
     Confirm = (ConfirmationFlags)reader.ReadByte();
     reader.Skip(1);
     LapsDone = reader.ReadUInt16();
     Flags = (PlayerFlags)reader.ReadUInt16();
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:20,代码来源:IS_FIN.cs

示例5: UnicodeSpeechRequest

        public UnicodeSpeechRequest(byte[] data)
            : base(data)
        {
            PacketReader reader = new PacketReader(data);
            byte id = reader.ReadByte();
            ushort blockSize = reader.ReadUInt16();

            byte type = reader.ReadByte();
            this.type = (byte)(type & 0x0F);
            color = reader.ReadUInt16();
            font = reader.ReadUInt16();
            language = reader.ReadAnsiString(4);

            if ((type & 0xC0) != 0)
            {
                int numKeywords = (Data[12] << 4) + (Data[13] >> 4);
                reader.Skip(((numKeywords * 12 + 12) + 7) / 8);

                text = reader.ReadAnsiString(Lenght - reader.Offset);
            }
            else
            {
                text = reader.ReadUnicodeString(Lenght - reader.Offset);
            }
        }
开发者ID:greeduomacro,项目名称:phoenix,代码行数:25,代码来源:UnicodeSpeechRequest.cs

示例6: oPCode

 public static void oPCode(Decode decode)
 {
     try
     {
         Systems sys = (Systems)decode.Packet;
         sys.PacketInformation = decode;
         PacketReader Reader = new PacketReader(sys.PacketInformation.buffer);
         LogDebug.Show("Opcode: {0}", decode.opcode);
         Opcode opc = (Opcode)decode.opcode;
         switch (opc)
         {
             case Opcode._MSG_LOGIN:
                 {
                     string username_shift = Reader.String(32);
                     string password_md5 = Reader.String(32);
                     Reader.Skip(4);
                     string client_mac = Reader.String(32);
                     Reader.Skip(32);
                     uint unk3 = Reader.UInt32();
                     StringShift shift = new StringShift();
                     string username = shift.Parser(username_shift);
                     LogDebug.Show("username: {0}", username);
                     LogDebug.Show("password_md5: {0}", password_md5);
                     //LogDebug.Show("Mac: {0}", client_mac);
                     //LogDebug.Show("unk3: {0}", unk3);
                     int res = UserLogin(username, password_md5, client_mac);
                     if (res == 1)
                     {
                         sys.client.SendC(ServerListPacket(1));
                     }
                     else
                     {
                         sys.client.SendC(UserFail(0xF0));
                     }
                 }
                 break;
             default:
                 LogConsole.Show("Default Opcode: {0:X} - {1}", decode.opcode, opc);
                 //LogDebug.HexDump(sys.PacketInformation.buffer, 16, true);
                 break;
         }
     }
     catch (Exception)
     {
     }
 }
开发者ID:CarlosX,项目名称:TestProjects,代码行数:46,代码来源:Function_Select.cs

示例7: IS_SSH

 /// <summary>
 /// Creates a new screenshot packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_SSH(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     Error = (ScreenshotError)reader.ReadByte();
     reader.Skip(4);
     BMP = reader.ReadString(32);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:14,代码来源:IS_SSH.cs

示例8: IS_VTN

 /// <summary>
 /// Creates a new vote notify.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_VTN(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     UCID = reader.ReadByte();
     Action = (VoteAction)reader.ReadByte();
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:14,代码来源:IS_VTN.cs

示例9: IS_NCI

 /// <summary>
 /// Creates a new IS_NCI class.
 /// </summary>
 /// <param name="buffer">The buffer containing the packet data.</param>
 public IS_NCI(byte[] buffer):this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     UCID = reader.ReadByte();
     Language = (LfsLanguage)reader.ReadByte();
     reader.Skip(3);
     UserID = reader.ReadUInt32();
     IPAddress = new IPAddress(reader.ReadUInt32());
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:15,代码来源:IS_NCI.cs

示例10: IS_HLV

 /// <summary>
 /// Creates a new <see cref="IS_HLV"/> object.
 /// </summary>
 /// <param name="buffer">The data to populate the packet with.</param>
 public IS_HLV(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     HLVC = (HlvcFlags)reader.ReadByte();
     reader.Skip(1);
     Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
     C = new CarContOBJ(reader);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:15,代码来源:IS_HLV.cs

示例11: IS_PIT

 /// <summary>
 /// Creates a new pit stop packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_PIT(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     PLID = reader.ReadByte();
     LapsDone = reader.ReadUInt16();
     Flags = (PlayerFlags)reader.ReadUInt16();
     reader.Skip(1);
     Penalty = (PenaltyValue)reader.ReadByte();
     NumStops = reader.ReadByte();
     reader.Skip(1);
     Tyres = new Tyres(
         (TyreCompound)reader.ReadByte(),
         (TyreCompound)reader.ReadByte(),
         (TyreCompound)reader.ReadByte(),
         (TyreCompound)reader.ReadByte());
     Work = (PitWorkFlags)reader.ReadUInt32();
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:24,代码来源:IS_PIT.cs

示例12: IS_CON

 /// <summary>
 /// Creates a new instance of the <see cref="IS_CON"/> packet.
 /// </summary>
 /// <param name="buffer">A buffer containing the packet data.</param>
 public IS_CON(byte[] buffer) {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     SpClose = reader.ReadUInt16();
     Time = TimeSpan.FromMilliseconds(reader.ReadUInt16() * 10);
     A = new CarContact(reader);
     B = new CarContact(reader);
 }
开发者ID:maindefine,项目名称:insimdotnet,代码行数:15,代码来源:IS_CON.cs

示例13: IS_VER

 /// <summary>
 /// Creates a new version packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_VER(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     Version = reader.ReadString(8);
     Product = reader.ReadString(6);
     InSimVer = reader.ReadUInt16();
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:15,代码来源:IS_VER.cs

示例14: CarContOBJ

        /// <summary>
        /// Creates a new <see cref="CarContOBJ"/> object.
        /// </summary>
        /// <param name="reader">A <see cref="PacketReader"/> contaning the data.</param>
        public CarContOBJ(PacketReader reader) {
            if (reader == null) {
                throw new ArgumentNullException("reader");
            }

            Direction = reader.ReadByte();
            Heading = reader.ReadByte();
            Speed = reader.ReadByte();
            reader.Skip(1);
            X = reader.ReadInt16();
            Y = reader.ReadInt16();
        }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:16,代码来源:CarContOBJ.cs

示例15: IS_AXI

 /// <summary>
 /// Creates a new AutoX info packet.
 /// </summary>
 /// <param name="buffer">A buffer contaning the packet data.</param>
 public IS_AXI(byte[] buffer)
     : this() {
     PacketReader reader = new PacketReader(buffer);
     Size = reader.ReadByte();
     Type = (PacketType)reader.ReadByte();
     ReqI = reader.ReadByte();
     reader.Skip(1);
     AXStart = reader.ReadByte();
     NumCP = reader.ReadByte();
     NumO = reader.ReadUInt16();
     LName = reader.ReadString(32);
 }
开发者ID:Kristoffeh,项目名称:InSim.NET_Library,代码行数:16,代码来源:IS_AXI.cs


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