Module uni_stream::addr
source · Expand description
Provide domain name resolution service
Structs§
- Implement Future to return asynchronous results
Enums§
- Represents one or more SockeAddr, since a String type may be a domain name or a direct address
Traits§
- Converts or resolves without blocking to one or more
SocketAddrvalues.
Functions§
- Look up all the socket addr’s and pass in the method to get the result
- Resolving domain to get
IpAddrNote: must run as async runtime,such astokio::task::spawn_blocking - Resolving
domain:portforms,such as bilibili.com:1080 - Resolving domain and port to get
SocketAddr - Set up DNS servers, use
DEFAULT_DNS_SERVER_GROUPby default Note: must be called before the first network connection to be effective