API Reference
Class
DnsWireResolveDot
Implements DNS over TLS (DoT) resolution using raw wire format messages.
Inheritance
- Object
- DnsWireResolveDot
Methods
ConnectAsync(System.Net.Sockets.TcpClient tcpClient, System.String host, System.Int32 port, System.Int32 timeoutMilliseconds, System.Threading.CancellationToken cancellationToken) #Connects asynchronously to the specified host using a TcpClient.
Parameters
- tcpClient System.Net.Sockets.TcpClient
- Client used for the connection.
- host System.String
- Target host.
- port System.Int32
- Target port.
- timeoutMilliseconds System.Int32
- Timeout in milliseconds.
- cancellationToken System.Threading.CancellationToken
- Token used to cancel the operation.
ResolveWireFormatDoT(System.String dnsServer, System.Int32 port, System.String name, DnsClientX.DnsRecordType type, System.Boolean requestDnsSec, System.Boolean validateDnsSec, System.Boolean debug, DnsClientX.Configuration endpointConfiguration, System.Boolean ignoreCertificateErrors, System.Threading.CancellationToken cancellationToken) #Sends a DNS query in wire format using DNS over TLS (DoT) and returns the response.
Parameters
- dnsServer System.String
- port System.Int32
- name System.String
- The name.
- type DnsClientX.DnsRecordType
- The type.
- requestDnsSec System.Boolean
- if set to true [request DNS sec].
- validateDnsSec System.Boolean
- if set to true [validate DNS sec].
- debug System.Boolean
- if set to true [debug].
- endpointConfiguration DnsClientX.Configuration
- Configuration used for server details.
- ignoreCertificateErrors System.Boolean
- Ignore certificate validation errors.
- cancellationToken System.Threading.CancellationToken
- Token used to cancel the operation.
Returns
The DNS response.
Exceptions
ArgumentNullException– name - Name is null or empty.Exception– Failed to read the length prefix of the response. or The stream was closed before the entire response could be read.