Skip to main content

resolve_public_addrs

Function resolve_public_addrs 

Source
pub async fn resolve_public_addrs(
    url: &str,
    dns_timeout: Duration,
) -> Result<Option<Vec<SocketAddr>>, A2aError>
Expand description

resolve_public_url, returning every address the host resolved to.

All of them are checked, and they come in the order the resolver gave them, without repeats. A caller that fails over from one to the next (a host with an A and an AAAA record, or several A records, one of them down) has them to try; None when the host is already a literal address.

Until 0.16.0 only the first was returned, and a delivery pinned to it failed on every attempt when that one address was down (audit B-13).

ยงErrors

As resolve_public_url.