c-ares-resolver

DNS resolvers built on c-ares, for asynchronous DNS requests.

This crate provides three resolver types - the Resolver, the FutureResolver, and the BlockingResolver:

Build Status Build status crates.io

Documentation

API documentation is here.

Examples

```rust extern crate caresresolver; extern crate futures; extern crate tokio; use std::error::Error; use futures::future::Future;

fn main() { let resolver = caresresolver::FutureResolver::new().unwrap(); let query = resolver .querya("google.com") .maperr(|e| println!("Lookup failed with error '{}'", e.description())) .map(|result| println!("{}", result)); tokio::run(query); } ```

Further example programs can be found here.

Contributing

Contributions are welcome. Please send pull requests!