component fathom.proto.dns
This component provides an API for the DNS protocol.
Methods
Methods | Returns | Description |
---|---|---|
create(
proto
)
|
void
static
|
↑
This function creates and returns a DNS object.
Parameters:
|
lookup(
callback, url
)
|
void
static
|
↑
This function implements an asynchronous DNS lookup.
(1) Needing to provide a URL is cumbersome and unintuitive. (2) Error semantics are missing.
Parameters:
|
query(
dnsObj, domain, type, recordClass, flags
)
|
void
static
|
↑
This function creates a DNS query.
Parameters:
|
response(
dnsObj, buf, domain, callback
)
|
void
static
|
↑
This function creates a DNS response from the data received.
Parameters:
|
sendRecv(
dnsObj, server, port, data, sendCallback, receiveCallback
)
|
void
static
|
↑
This API performs low-level socket operations based on the protocol selected and sends and receives data.
Parameters:
|