Crates.io | tokio-dns-unofficial |
lib.rs | tokio-dns-unofficial |
version | 0.4.0 |
source | src |
created_at | 2016-12-20 02:44:07.190882 |
updated_at | 2018-08-02 00:40:15.77992 |
description | Unofficial extension to tokio to provide asynchronous DNS resolution |
homepage | https://github.com/sbstp/tokio-dns |
repository | https://github.com/sbstp/tokio-dns |
max_upload_size | |
id | 7686 |
size | 29,578 |
Asynchronous name resolution utilities for the futures
and tokio-core
crates. Look at the crate-level documentation for more details.
This library has been packaged to crates.io. Note that its name on crates.io is tokio-dns-unofficial
, but the crate's name is tokio_dns
(when using extern crate ...
).
Added a ton of combinations of IpAdrr
, SocketAddr
, and port
to the ToEndpoint
trait.
Added new free functions to resolve a host/endpoint to a sequence of ip addresses or socket addresses, thanks @Fedcomp .
Small docs changes and new examples.
rustc
regression, thanks @mehcode .Update to the new tokio
crate.
Change the API to look more like tokio
's API.
New resolve
free function to resolve a hostname asynchronously using the default resolver.
// Taken from examples/basic.rs
use tokio_dns::TcpStream;
// connect using the built-in resolver.
let conn = TcpStream::connect("rust-lang.org:80").and_then(|sock| {
println!("conncted to {}", sock.peer_addr().unwrap());
Ok(())
});