Domain Detective

API Reference

Class

DnsWireResolveTcp

Namespace DnsClientX

Provides DNS resolution over TCP using the DNS wire protocol.

Inheritance

  • Object
  • DnsWireResolveTcp

Methods

ConnectAsync(System.Net.Sockets.TcpClient tcpClient, System.String host, System.Int32 port, System.Int32 timeoutMilliseconds, System.Threading.CancellationToken cancellationToken) #

Connects the provided TcpClient with support for timeout and cancellation on older frameworks.

Parameters

tcpClient System.Net.Sockets.TcpClient required
Client used for the connection.
host System.String required
Target host.
port System.Int32 required
Target port.
timeoutMilliseconds System.Int32 required
Timeout in milliseconds.
cancellationToken System.Threading.CancellationToken required
Token used to cancel the operation.
ReadExactWithTimeoutAsync(System.IO.Stream arg1, System.Byte[] arg2, System.Int32 arg3, System.Int32 arg4, System.Int32 arg5, System.Threading.CancellationToken arg6) #

Helper to read exactly the requested number of bytes from a stream with timeout.

Parameters

arg1 System.IO.Stream required
arg2 System.Byte[] required
arg3 System.Int32 required
arg4 System.Int32 required
arg5 System.Int32 required
arg6 System.Threading.CancellationToken required
ResolveWireFormatTcp(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.Threading.CancellationToken cancellationToken) #

Sends a DNS query in wire format using DNS over TCP (53) and returns the response.

Parameters

dnsServer System.String required
port System.Int32 required
name System.String required
type DnsClientX.DnsRecordType required
requestDnsSec System.Boolean required
validateDnsSec System.Boolean required
debug System.Boolean required
endpointConfiguration DnsClientX.Configuration required
Provide configuration so it can be added to Question for display purposes
cancellationToken System.Threading.CancellationToken required
Token used to cancel the operation.

Returns

The DNS response.

Exceptions

  • ArgumentNullException
SendQueryOverTcp(System.Byte[] query, System.String dnsServer, System.Int32 port, System.Int32 timeoutMilliseconds, System.Threading.CancellationToken cancellationToken) #

Sends a DNS query over TCP and returns the response.

Parameters

query System.Byte[] required
dnsServer System.String required
port System.Int32 required
timeoutMilliseconds System.Int32 required
Timeout in milliseconds.
cancellationToken System.Threading.CancellationToken required
Token used to cancel the operation.

Returns

Raw DNS response bytes.

{{ include "footer" }}