Function get_ip_from

Source
pub async fn get_ip_from<T: AsyncHttpGetClient>(
    client: Option<T>,
    addr: &str,
) -> Result<IpAddr, IpRetrieveError>
Expand description

Asynchronously gets the IP address of this node. If prefer_ipv6 is true, then the client will attempt to get the IP address; however, if the client is using an IPv4 address, that will be returned instead.

If a reqwest client is supplied, this function will use that client to get the information. None by default.