Module addr

Source
Expand description

Provide domain name resolution service

Structs§

MaybeReady
Implement Future to return asynchronous results

Enums§

OneOrMore
Represents one or more SockeAddr, since a String type may be a domain name or a direct address

Traits§

ToSocketAddrs
Converts or resolves without blocking to one or more SocketAddr values.

Functions§

each_addr
Look up all the socket addr’s and pass in the method to get the result
get_ip_addrs
Resolving domain to get IpAddr Note: must run as async runtime,such as tokio::task::spawn_blocking
get_socket_addrs
Resolving domain:port forms,such as bilibili.com:1080
get_socket_addrs_from_host_port
Resolving domain and port to get SocketAddr
set_custom_dns_server
Set up DNS servers, use DEFAULT_DNS_SERVER_GROUP by default Note: must be called before the first network connection to be effective