Closes the connection and rejects any in-flight queries.
Resolves once the socket is closed.
Resolves A, AAAA, NS, CNAME, or PTR to a string array.
Resolves TXT to an array of records, each an array of its character-strings.
Resolves the SOA record (or undefined when absent).
Resolves HTTPS or SVCB service-binding records.
Resolves the record TYPE named in opts.type, with per-query options.
Resolves with per-query options (numeric or omitted TYPE yields raw records).
Optionalopts: QueryOptionsResolves a numeric record TYPE to its raw records.
Runs a raw query and returns the full structured message (answer + authority + additional).
A live DNS session over a single TCP (or TLS) connection.
Obtain one from connect. A background pump reads length-prefixed responses and correlates them to pending queries by id, so several query calls can be in flight at once (RFC 7766 pipelining). It is an
AsyncDisposable, soawait usingcloses it cleanly.Since
1.0.4