Esempio n. 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;
        }
        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;
        }
Esempio n. 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);
            }
        }
Esempio n. 4
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);
            }
        }