Function async_net::resolve

source ·
pub async fn resolve<A: AsyncToSocketAddrs>(addr: A) -> Result<Vec<SocketAddr>>
Expand description

Converts or resolves addresses to SocketAddr values.

Examples

for addr in async_net::resolve("google.com:80").await? {
    println!("{}", addr);
}