pub async fn to_ip_addr(&self) -> io::Result<IpAddr> {
        let addr = match self.host.parse::<IpAddr>() {
            Ok(addr) => addr,
            Err(_) => lookup_host((self.host.as_str(), self.port))
                .await?
                .next()
                .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Failed to lookup_host"))?
                .ip(),
        };

        Ok(addr)
    }
/// Returns the ip address associated with the session based on the host
Returns the ip address associated with the session based on the host
Returns the ip address associated with the session based on the host
pub async fn to_ip_addr(&self) -> io::Result<IpAddr> {
        let addr = match self.host.parse::<IpAddr>() {
            Ok(addr) => addr,
            Err(_) => lookup_host((self.host.as_str(), self.port))
                .await?
                .next()
                .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "Failed to lookup_host"))?
                .ip(),
        };
        Ok(addr)
    }
pub async fn to_ip_addr ( & self ) -> io :: Result < IpAddr > { let addr = match self . host . parse :: < IpAddr > ( ) { Ok ( addr ) => addr , Err ( _ ) => lookup_host ( ( self . host . as_str ( ) , self . port ) ) . await ? . next ( ) . ok_or_else ( | | io :: Error :: new ( io :: ErrorKind :: NotFound , " " ) ) ? . ip ( ) , } ; Ok ( addr ) }
Returns the ip address associated with the session based on the host
Returns the ip address associated with the session based on the host
&self