resolve
external fun resolve(hostname: String, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
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
:
On error, err
is an Error
object, where err.code
is one of the DNS error codes
.
Since
v0.1.27
Parameters
hostname
Host name to resolve.
rrtype='A' Resource record type.
external fun resolve(hostname: String, rrtype: ResourceRecordType.A, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.AAAA, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.ANY, callback: (err: ErrnoException?, ReadonlyArray<AnyRecord>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.CNAME, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.MX, callback: (err: ErrnoException?, ReadonlyArray<MxRecord>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.NAPTR, callback: (err: ErrnoException?, ReadonlyArray<NaptrRecord>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.NS, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.PTR, callback: (err: ErrnoException?, ReadonlyArray<String>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.SOA, callback: (err: ErrnoException?, addresses: SoaRecord) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.SRV, callback: (err: ErrnoException?, ReadonlyArray<SrvRecord>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: ResourceRecordType.TXT, callback: (err: ErrnoException?, ReadonlyArray<ReadonlyArray<String>>) -> Unit)(source)
external fun resolve(hostname: String, rrtype: String, callback: (err: ErrnoException?, addresses: Any) -> Unit)(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.AAAA): ReadonlyArray<String>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.ANY): ReadonlyArray<AnyRecord>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.CAA): ReadonlyArray<CaaRecord>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.CNAME): ReadonlyArray<String>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.MX): ReadonlyArray<MxRecord>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.NAPTR): ReadonlyArray<NaptrRecord>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.PTR): ReadonlyArray<String>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.SRV): ReadonlyArray<SrvRecord>(source)
suspend fun resolve(hostname: String, rrtype: ResourceRecordType.TXT): ReadonlyArray<ReadonlyArray<String>>(source)