tokio-rustls/README.md
quininer kel 7e4fcca032 [Improved] MidHandshake/TlsStream
- [Improved] README.md
- [Improved] MidHandshake poll
- [Improved] TlsStream read
- [Fixed] TlsStream write, possible of repeat write
- [Removed] TlsStream poll_{read, write}
2017-02-27 21:02:35 +08:00

782 B

tokio-rustls

crates license docs.rs

tokio-tls fork, use rustls.

exmaple

// ...

use rustls::ClientConfig;
use tokio_rustls::ClientConfigExt;

let mut config = ClientConfig::new();
config.root_store.add_trust_anchors(&webpki_roots::ROOTS);
let config = Arc::new(config);

TcpStream::connect(&addr, &handle)
	.and_then(|socket| config.connect_async("www.rust-lang.org", socket))

// ...