Package-level declarations

Types

Link copied to clipboard
sealed external interface AnyAaaaRecord : RecordWithTtl
Link copied to clipboard
sealed external interface AnyARecord : RecordWithTtl
Link copied to clipboard
sealed external interface AnyCaaRecord : CaaRecord
Link copied to clipboard
sealed external interface AnyCnameRecord
Link copied to clipboard
sealed external interface AnyMxRecord : MxRecord
Link copied to clipboard
sealed external interface AnyNaptrRecord : NaptrRecord
Link copied to clipboard
sealed external interface AnyNsRecord
Link copied to clipboard
sealed external interface AnyPtrRecord
Link copied to clipboard
typealias AnyRecord = Any
Link copied to clipboard
typealias AnyRecordWithTtl = Any
Link copied to clipboard
sealed external interface AnySoaRecord : SoaRecord
Link copied to clipboard
sealed external interface AnySrvRecord : SrvRecord
Link copied to clipboard
sealed external interface AnyTlsaRecord : TlsaRecord
Link copied to clipboard
sealed external interface AnyTxtRecord
Link copied to clipboard
sealed external interface CaaRecord
Link copied to clipboard
sealed external interface GetDefaultResultOrderResult
Link copied to clipboard
sealed external interface LookupAddress
Link copied to clipboard
sealed external interface LookupAllOptions : LookupOptions
Link copied to clipboard
sealed external interface LookupOneOptions : LookupOptions
Link copied to clipboard
sealed external interface LookupOptions
Link copied to clipboard
sealed external interface LookupOptionsOrder
Link copied to clipboard
sealed external interface LookupServiceResultPayload
Link copied to clipboard
sealed external interface MxRecord
Link copied to clipboard
sealed external interface NaptrRecord
Link copied to clipboard
sealed external interface RecordWithTtl
Link copied to clipboard
sealed external interface ResolveOptions
Link copied to clipboard
external class Resolver

An independent resolver for DNS requests.

Link copied to clipboard
sealed external interface ResolverOptions
Link copied to clipboard
sealed external interface ResolveWithTtlOptions : ResolveOptions
Link copied to clipboard
sealed external interface ResourceRecordType
Link copied to clipboard
sealed external interface SetDefaultResultOrderOrder
Link copied to clipboard
sealed external interface SoaRecord
Link copied to clipboard
sealed external interface SrvRecord
Link copied to clipboard
sealed external interface TlsaRecord

Properties

Link copied to clipboard
external val ADDRCONFIG: Double
Link copied to clipboard
Link copied to clipboard
external val ALL: Double
Link copied to clipboard
external val BADFAMILY: String
Link copied to clipboard
external val BADFLAGS: String
Link copied to clipboard
external val BADHINTS: String
Link copied to clipboard
external val BADNAME: String
Link copied to clipboard
external val BADQUERY: String
Link copied to clipboard
external val BADRESP: String
Link copied to clipboard
external val BADSTR: String
Link copied to clipboard
external val CANCELLED: String
Link copied to clipboard
external val CONNREFUSED: String
Link copied to clipboard
external val DESTRUCTION: String
Link copied to clipboard
external val EOF: String
Link copied to clipboard
external val FILE: String
Link copied to clipboard
external val FORMERR: String
Link copied to clipboard
external val LOADIPHLPAPI: String
Link copied to clipboard
external val NODATA: String
Link copied to clipboard
external val NOMEM: String
Link copied to clipboard
external val NONAME: String
Link copied to clipboard
external val NOTFOUND: String
Link copied to clipboard
external val NOTIMP: String
Link copied to clipboard
external val NOTINITIALIZED: String
Link copied to clipboard
external val REFUSED: String
Link copied to clipboard
external val SERVFAIL: String
Link copied to clipboard
external val TIMEOUT: String
Link copied to clipboard
external val V4MAPPED: Double

Functions

Link copied to clipboard

Get the default value for order in {@link lookup} and dnsPromises.lookup(). The value could be:

Link copied to clipboard
external fun getServers(): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>

Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.

Link copied to clipboard
suspend external fun lookup(hostname: String): LookupAddress
external fun lookup(hostname: String, callback: (err: ErrnoException?, address: String, family: Double) -> Unit)
suspend external fun lookup(hostname: String, family: Number): LookupAddress
suspend external fun lookup(hostname: String, options: LookupAllOptions): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/LookupAddress>
suspend external fun lookup(hostname: String, options: LookupOneOptions): LookupAddress
suspend external fun lookup(hostname: String, options: LookupOptions): Any
external fun lookup(hostname: String, options: LookupAllOptions, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/LookupAddress>) -> Unit)
external fun lookup(hostname: String, options: LookupOneOptions, callback: (err: ErrnoException?, address: String, family: Double) -> Unit)
external fun lookup(hostname: String, options: LookupOptions, callback: (err: ErrnoException?, address: Any, family: Double) -> Unit)

external fun lookup(hostname: String, family: Number, callback: (err: ErrnoException?, address: String, family: Double) -> Unit)

Resolves a host name (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. All option properties are optional. If options is an integer, then it must be 4 or 6 – if options is 0 or not provided, then IPv4 and IPv6 addresses are both returned if found.

Link copied to clipboard
external fun lookupAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<node/dns/LookupAddress>
external fun lookupAsync(hostname: String, options: LookupAllOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/LookupAddress>>
external fun lookupAsync(hostname: String, options: LookupOneOptions): ERROR CLASS: Symbol not found for Promise<node/dns/LookupAddress>
external fun lookupAsync(hostname: String, options: LookupOptions): ERROR CLASS: Symbol not found for Promise<kotlin/Any>

external fun lookupAsync(hostname: String, family: Number): ERROR CLASS: Symbol not found for Promise<node/dns/LookupAddress>

Resolves a host name (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. All option properties are optional. If options is an integer, then it must be 4 or 6 – if options is not provided, then IPv4 and IPv6 addresses are both returned if found.

Link copied to clipboard
suspend external fun lookupService(address: String, port: Number): LookupServiceResultPayload

external fun lookupService(address: String, port: Number, callback: (err: ErrnoException?, hostname: String, service: String) -> Unit)

Resolves the given address and port into a host name and service using the operating system's underlying getnameinfo implementation.

Link copied to clipboard
external fun lookupServiceAsync(address: String, port: Number): ERROR CLASS: Symbol not found for Promise<node/dns/LookupServiceResultPayload>

Resolves the given address and port into a host name and service using the operating system's underlying getnameinfo implementation.

Link copied to clipboard
suspend external fun resolve(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>
suspend external fun resolve(hostname: String, rrtype: String): Any
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.ANY): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.CAA): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.MX): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.NAPTR): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.SOA): SoaRecord
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.SRV): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.StringRecord): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.TLSA): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>
suspend external fun resolve(hostname: String, rrtype: ResourceRecordType.TXT): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>
external fun resolve(hostname: String, rrtype: String, callback: (err: ErrnoException?, addresses: Any) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.ANY, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.CAA, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(address)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.MX, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.NAPTR, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.SOA, callback: (err: ErrnoException?, addresses: SoaRecord) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.SRV, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.StringRecord, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.TLSA, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>) -> Unit)
external fun resolve(hostname: String, rrtype: ResourceRecordType.TXT, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>) -> Unit)

external fun resolve(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. The callback function has arguments (err, records). When successful, records will be an array of resource records. The type and structure of individual results varies based on rrtype:

Link copied to clipboard
suspend external fun resolve4(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>
suspend external fun resolve4(hostname: String, options: ResolveOptions): Any
suspend external fun resolve4(hostname: String, options: ResolveWithTtlOptions): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>
external fun resolve4(hostname: String, options: ResolveOptions, callback: (err: ErrnoException?, addresses: Any) -> Unit)
external fun resolve4(hostname: String, options: ResolveWithTtlOptions, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>) -> Unit)

external fun resolve4(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']).

Link copied to clipboard
external fun resolve4Async(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve IPv4 addresses (A records) for the hostname. On success, the Promise is resolved with an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).

external fun resolve4Async(hostname: String, options: ResolveOptions): ERROR CLASS: Symbol not found for Promise<kotlin/Any>
external fun resolve4Async(hostname: String, options: ResolveWithTtlOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>>
Link copied to clipboard
suspend external fun resolve6(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>
suspend external fun resolve6(hostname: String, options: ResolveOptions): Any
suspend external fun resolve6(hostname: String, options: ResolveWithTtlOptions): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>
external fun resolve6(hostname: String, options: ResolveOptions, callback: (err: ErrnoException?, addresses: Any) -> Unit)
external fun resolve6(hostname: String, options: ResolveWithTtlOptions, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>) -> Unit)

external fun resolve6(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve IPv6 addresses (AAAA records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv6 addresses.

Link copied to clipboard
external fun resolve6Async(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve IPv6 addresses (AAAA records) for the hostname. On success, the Promise is resolved with an array of IPv6 addresses.

external fun resolve6Async(hostname: String, options: ResolveOptions): ERROR CLASS: Symbol not found for Promise<kotlin/Any>
external fun resolve6Async(hostname: String, options: ResolveWithTtlOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/RecordWithTtl>>
Link copied to clipboard
suspend external fun resolveAny(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>

external fun resolveAny(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>) -> Unit)

Uses the DNS protocol to resolve all records (also known as ANY or * query). The ret argument passed to the callback function will be an array containing various types of records. Each object has a property type that indicates the type of the current record. And depending on the type, additional properties will be present on the object:

Link copied to clipboard
external fun resolveAnyAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>>

Uses the DNS protocol to resolve all records (also known as ANY or * query). On success, the Promise is resolved with an array containing various types of records. Each object has a property type that indicates the type of the current record. And depending on the type, additional properties will be present on the object:

Link copied to clipboard
external fun resolveAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

external fun resolveAsync(hostname: String, rrtype: String): ERROR CLASS: Symbol not found for Promise<kotlin/Any>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.ANY): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<{node/dns/AnyRecord=} kotlin/Any>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.CAA): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.MX): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.NAPTR): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.SOA): ERROR CLASS: Symbol not found for Promise<node/dns/SoaRecord>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.SRV): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.StringRecord): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.TLSA): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>>
external fun resolveAsync(hostname: String, rrtype: ResourceRecordType.TXT): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>>
Link copied to clipboard
suspend external fun resolveCaa(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>

external fun resolveCaa(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(records)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>) -> Unit)

Uses the DNS protocol to resolve CAA records for the hostname. The addresses argument passed to the callback function will contain an array of certification authority authorization records available for the hostname (e.g. [{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]).

Link copied to clipboard
external fun resolveCaaAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/CaaRecord>>

Uses the DNS protocol to resolve CAA records for the hostname. On success, the Promise is resolved with an array of objects containing available certification authority authorization records available for the hostname (e.g. [{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]).

Link copied to clipboard
suspend external fun resolveCname(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>

external fun resolveCname(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve CNAME records for the hostname. The addresses argument passed to the callback function will contain an array of canonical name records available for the hostname (e.g. ['bar.example.com']).

Link copied to clipboard
external fun resolveCnameAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve CNAME records for the hostname. On success, the Promise is resolved with an array of canonical name records available for the hostname (e.g. ['bar.example.com']).

Link copied to clipboard
suspend external fun resolveMx(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>

external fun resolveMx(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>) -> Unit)

Uses the DNS protocol to resolve mail exchange records (MX records) for the hostname. The addresses argument passed to the callback function will contain an array of objects containing both a priority and exchange property (e.g. [{priority: 10, exchange: 'mx.example.com'}, ...]).

Link copied to clipboard
external fun resolveMxAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/MxRecord>>

Uses the DNS protocol to resolve mail exchange records (MX records) for the hostname. On success, the Promise is resolved with an array of objects containing both a priority and exchange property (e.g.[{priority: 10, exchange: 'mx.example.com'}, ...]).

Link copied to clipboard
suspend external fun resolveNaptr(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>

external fun resolveNaptr(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>) -> Unit)

Uses the DNS protocol to resolve regular expression-based records (NAPTR records) for the hostname. The addresses argument passed to the callback function will contain an array of objects with the following properties:

Link copied to clipboard
external fun resolveNaptrAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/NaptrRecord>>

Uses the DNS protocol to resolve regular expression-based records (NAPTR records) for the hostname. On success, the Promise is resolved with an array of objects with the following properties:

Link copied to clipboard
suspend external fun resolveNs(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>

external fun resolveNs(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve name server records (NS records) for the hostname. The addresses argument passed to the callback function will contain an array of name server records available for hostname (e.g. ['ns1.example.com', 'ns2.example.com']).

Link copied to clipboard
external fun resolveNsAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve name server records (NS records) for the hostname. On success, the Promise is resolved with an array of name server records available for hostname (e.g.['ns1.example.com', 'ns2.example.com']).

Link copied to clipboard
suspend external fun resolvePtr(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>

external fun resolvePtr(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Uses the DNS protocol to resolve pointer records (PTR records) for the hostname. The addresses argument passed to the callback function will be an array of strings containing the reply records.

Link copied to clipboard
external fun resolvePtrAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Uses the DNS protocol to resolve pointer records (PTR records) for the hostname. On success, the Promise is resolved with an array of strings containing the reply records.

Link copied to clipboard
suspend external fun resolveSoa(hostname: String): SoaRecord

external fun resolveSoa(hostname: String, callback: (err: ErrnoException?, address: SoaRecord) -> Unit)

Uses the DNS protocol to resolve a start of authority record (SOA record) for the hostname. The address argument passed to the callback function will be an object with the following properties:

Link copied to clipboard
external fun resolveSoaAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<node/dns/SoaRecord>

Uses the DNS protocol to resolve a start of authority record (SOA record) for the hostname. On success, the Promise is resolved with an object with the following properties:

Link copied to clipboard
suspend external fun resolveSrv(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>

external fun resolveSrv(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>) -> Unit)

Uses the DNS protocol to resolve service records (SRV records) for the hostname. The addresses argument passed to the callback function will be an array of objects with the following properties:

Link copied to clipboard
external fun resolveSrvAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/SrvRecord>>

Uses the DNS protocol to resolve service records (SRV records) for the hostname. On success, the Promise is resolved with an array of objects with the following properties:

Link copied to clipboard
suspend external fun resolveTlsa(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>

external fun resolveTlsa(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>) -> Unit)

Uses the DNS protocol to resolve certificate associations (TLSA records) for the hostname. The records argument passed to the callback function is an array of objects with these properties:

Link copied to clipboard
external fun resolveTlsaAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/dns/TlsaRecord>>

Uses the DNS protocol to resolve certificate associations (TLSA records) for the hostname. On success, the Promise is resolved with an array of objectsAdd commentMore actions with these properties:

Link copied to clipboard
suspend external fun resolveTxt(hostname: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

external fun resolveTxt(hostname: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(addresses)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>) -> Unit)

Uses the DNS protocol to resolve text queries (TXT records) for the hostname. The records argument passed to the callback function is a two-dimensional array of the text records available for hostname (e.g.[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately.

Link copied to clipboard
external fun resolveTxtAsync(hostname: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>>

Uses the DNS protocol to resolve text queries (TXT records) for the hostname. On success, the Promise is resolved with a two-dimensional array of the text records available for hostname (e.g.[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately.

Link copied to clipboard
suspend external fun reverse(ip: String): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>

external fun reverse(ip: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(hostnames)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)

Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.

Link copied to clipboard
external fun reverseAsync(ip: String): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>>

Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of host names.

Link copied to clipboard

Set the default value of order in {@link lookup} and dnsPromises.lookup(). The value could be:

Link copied to clipboard
external fun setServers(servers: ERROR CLASS: Symbol not found for ReadonlyArray<kotlin/String>)

Sets the IP address and port of servers to be used when performing DNS resolution. The servers argument is an array of RFC 5952 formatted addresses. If the port is the IANA default DNS port (53) it can be omitted.