A compatibility crate to use trust-dns-resolver asynchronously with hyper client, instead the default dns threadpool
By default hyper HttpConnector uses the std provided resolver wich is blocking in a threadpool with a configurable number of threads. This crate provides an alternative using trustdnsresolver, a dns resolver written in Rust, with async features.
```rust extern crate hypertrustdns_connector; extern crate hyper; extern crate tokio;
use hypertrustdnsconnector::newasynchttpconnector; use hyper::{Client, Body}; use tokio::prelude::Future; use tokio::runtime::Runtime;
fn main() { let mut rt = Runtime::new().expect("couldn't create runtime"); let (asynchttp, background) = newasynchttpconnector() .expect("couldn't create connector"); let client = Client::builder() .executor(rt.executor()) .build::<_, Body>(asynchttp); rt.spawn(background); let statuscode = rt .blockon(client.get(hyper::Uri::fromstatic("http://httpbin.org/ip")) .map(|res| res.status())) .expect("error during the request"); println!("status is {:?}", status_code); } ```