Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
        /// <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);
        }