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; }
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); } }