Trait tokio_websockets::resolver::Resolver

source ·
pub trait Resolver: Send {
    // Required method
    fn resolve(
        &self,
        host: &str,
        port: u16,
    ) -> impl Future<Output = Result<SocketAddr, Error>> + Send;
}
Available on crate feature client only.
Expand description

Trait for a DNS resolver to resolve hostnames and ports to IP addresses.

Required Methods§

source

fn resolve( &self, host: &str, port: u16, ) -> impl Future<Output = Result<SocketAddr, Error>> + Send

Resolve a hostname and port to an IP address, asynchronously.

Object Safety§

This trait is not object safe.

Implementors§