pub async fn resolve_public_url(
url: &str,
dns_timeout: Duration,
) -> Result<Option<SocketAddr>, A2aError>Expand description
check_public_url, then the same check on every resolved address.
The host is resolved within dns_timeout, and refused if any address it
resolves to is private. Returns the
first address to connect to, or None when the host is already a
literal address. A host with several addresses has more than one to
connect to; resolve_public_addrs returns them all.
ยงErrors
InvalidParams when the URL is refused, the name does not resolve, or
resolution takes longer than dns_timeout.