resolve_dns

Function resolve_dns 

Source
pub async fn resolve_dns(query: DnsQuery<'_>) -> Result<IpAddr, Error>
Expand description

Resolve the DNS query.

The modem has an internal cache so this process may be really quick. If the hostname is not known internally or if it has expired, then it has to be requested from a DNS server.

While this function is async, the actual DNS bit is blocking because the modem sadly has no async API for this.

The modem API is capable of setting the dns server, but that’s not yet implemented in this wrapper.