Libraries
bignum
binary
bitmap
ble
bytes
core
crypto
device
encoding
esp32
expect
fixed-point
flash
font
gpio
i2c
i2s
icons
io
line-wrap
log
math
monitor
net
cellular
ethernet
ip-address
modules
dns
mtu
tcp
udp
socket-address
tcp
udp
wifi
x509
pulse-counter
reader
reader-writer
rmt
serial
spi
statistics
system
tls
uart
uuid
writer
zlib
Interface DnsClient
A DnsClient contains a list of DNS servers in the form of IP addresses in string form.
The client starts by using the first DNS server in the list.
If a DNS server fails to answer after 2.5 times the
DNS-RETRY-TIMEOUT
, then the client switches permanently to the next one on the list.
Interface summary
Constructors
Statics
Methods
Fields
constructor
servers/
List
Constructors
constructor
servers/
List
Statics
mdns
->
DnsClient
Methods
get
name/
any
--record-types/
List
--network/
Interface
--timeout/
Duration
=
DNS-DEFAULT-TIMEOUT
->
List
Look up a domain name and return a list of results.
The
record-types
argument can be a set of
RECORD-A
, or
RECORD-AAAA
, in which case the result is a list of
net.IpAddress
.
If the
record-types
contains
RECORD-TXT
,
RECORD-PTR
, or
RECORD-CNAME
the results will be strings.
If the
record-types
contains
RECORD-SRV
, the results are instances of
SrvResource
(normally only used for mDNS).
get
name/
any
--network/
Interface
--accept-ipv4/
bool
=
true
--accept-ipv6/
bool
=
false
--timeout/
Duration
=
DNS-DEFAULT-TIMEOUT
->
IpAddress
Look up a domain name and return an A or AAAA record.
If given a numeric address like "127.0.0.1" merely parses the numbers without a network round trip.