Class DnsResource
- Namespace
- AppleTvControlLibrary.Discovery.Dns
- Assembly
- AppleTvControlLibrary.Discovery.dll
Represents a DNS resource record.
public sealed class DnsResource
- Inheritance
-
DnsResource
- Inherited Members
Remarks
Initializes a new instance of the DnsResource class.
Constructors
DnsResource(string, QueryType, ushort, uint, ushort, object)
Represents a DNS resource record.
public DnsResource(string qname, QueryType qtype, ushort qclass, uint ttl, ushort rdLength, object rd)
Parameters
Remarks
Initializes a new instance of the DnsResource class.
Properties
QClass
Gets the record class.
public ushort QClass { get; }
Property Value
QName
Gets the record name.
public string QName { get; }
Property Value
QType
Gets the record type.
public QueryType QType { get; }
Property Value
Rd
Gets the parsed RDATA. The runtime type depends on QType: a string for A/PTR, a Dictionary<TKey, TValue> of string to byte[] for TXT, a SrvRecord for SRV, or raw byte[] otherwise.
public object Rd { get; }
Property Value
RdLength
Gets the RDATA byte length as read from the wire.
public ushort RdLength { get; }
Property Value
Ttl
Gets the record time-to-live.
public uint Ttl { get; }
Property Value
Methods
UnpackRead(DnsBufferReader)
Creates a DnsResource from data in a data stream.
public static DnsResource UnpackRead(DnsBufferReader buffer)
Parameters
bufferDnsBufferReaderThe buffer to read from.
Returns
- DnsResource
The parsed resource record.