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
:
- The
Resolver
is the thinnest wrapper around the underlyingc-ares
library. It returns answers via callbacks. The other resolvers are built on top of this. - The
FutureResolver
returns answers asstd::future::Future
s. - The
BlockingResolver
isn't asynchronous at all - as the name suggests, it blocks until the lookup completes.
Documentation
API documentation is here.
Setting the feature build-cmake
will cause the c-ares
library to be built
using cmake
.
This is significantly faster than the default autotools
build on unix
platforms: so if it works for you, you should probably prefer it.
Examples
extern crate c_ares_resolver;
extern crate futures_executor;
use block_on;
Further example programs can be found here.
Contributing
Contributions are welcome. Please send pull requests!