pub fn lookup(
        &self,
        mut req: Connect<T>,
    ) -> Either<ResolverFuture<T>, Ready<Result<Connect<T>, ConnectError>>> {
        if req.addr.is_some() || req.req.addr().is_some() {
            Either::Right(ok(req))
        } else if let Ok(ip) = req.host().parse() {
            req.addr = Some(either::Either::Left(SocketAddr::new(ip, req.port())));
            Either::Right(ok(req))
        } else {
            trace!("DNS resolver: resolving host {:?}", req.host());
            Either::Left(ResolverFuture::new(req, &self.resolver))
        }
    }
/// Lookup ip addresses for provided host
Lookup ip addresses for provided host
Lookup ip addresses for provided host
pub fn lookup(
        &self,
        mut req: Connect<T>,
    ) -> Either<ResolverFuture<T>, Ready<Result<Connect<T>, ConnectError>>> {
        if req.addr.is_some() || req.req.addr().is_some() {
            Either::Right(ok(req))
        } else if let Ok(ip) = req.host().parse() {
            req.addr = Some(either::Either::Left(SocketAddr::new(ip, req.port())));
            Either::Right(ok(req))
        } else {
            trace!("DNS resolver: resolving host {:?}", req.host());
            Either::Left(ResolverFuture::new(req, &self.resolver))
        }
    }
pub fn lookup ( & self , mut req : Connect < T > , ) -> Either < ResolverFuture < T > , Ready < Result < Connect < T > , ConnectError > > > { if req . addr . is_some ( ) || req . req . addr ( ) . is_some ( ) { Either :: Right ( ok ( req ) ) } else if let Ok ( ip ) = req . host ( ) . parse ( ) { req . addr = Some ( either :: Either :: Left ( SocketAddr :: new ( ip , req . port ( ) ) ) ) ; Either :: Right ( ok ( req ) ) } else { trace ! ( " " req host ( ) ) ; Either :: Left ( ResolverFuture :: new ( req , & self . resolver ) ) } }
Lookup ip addresses for provided host
Lookup ip addresses for provided host
&self
req
Connect<T>