示例#1
0
        internal IP4AddressRecord(string name, RecordType type, RecordClass rClass, DateTime expiry, PacketReader reader)
            : base(name, type, rClass, expiry)
        {
            ushort dataLen = reader.ReadUShort();
            int pos = reader.Position;

            _address = new IPAddress(reader.ReadBytes(dataLen));

            reader.Position = pos + dataLen;
        }
示例#2
0
        internal IP4AddressRecord(string name, RecordType type, RecordClass rClass, DateTime expiry, PacketReader reader)
            : base(name, type, rClass, expiry)
        {
            ushort dataLen = reader.ReadUShort();
            int    pos     = reader.Position;

            Address = new IPAddress(reader.ReadBytes(dataLen));

            reader.Position = pos + dataLen;
        }
示例#3
0
        internal TextRecord(string name, RecordType type, RecordClass rClass, DateTime expiry, PacketReader reader)
            : base(name, type, rClass, expiry)
        {
            _values = new Dictionary<string, byte[]>();

            ushort dataLen = reader.ReadUShort();
            int pos = reader.Position;

            while (reader.Position < pos + dataLen)
            {
                int valueLen = reader.ReadByte();
                byte[] valueBinary = reader.ReadBytes(valueLen);

                StoreValue(valueBinary);
            }
        }
        internal TextRecord(string name, RecordType type, RecordClass rClass, DateTime expiry, PacketReader reader)
            : base(name, type, rClass, expiry)
        {
            _values = new Dictionary <string, byte[]>();

            ushort dataLen = reader.ReadUShort();
            int    pos     = reader.Position;

            while (reader.Position < pos + dataLen)
            {
                int    valueLen    = reader.ReadByte();
                byte[] valueBinary = reader.ReadBytes(valueLen);

                StoreValue(valueBinary);
            }
        }