async-native-tls 0.2.0

Native TLS using futures
Documentation

Native TLS for futures and async-std. Based on tokio-tls.

Installation

$ cargo add async-native-tls

Example

use async_std::prelude::*;
use async_std::net::TcpStream;

let stream = TcpStream::connect("google.com:443").await?;
let mut stream = async_native_tls::connect("google.com", stream).await?;
stream.write_all(b"GET / HTTP/1.0\r\n\r\n").await?;

let mut res = Vec::new();
stream.read_to_end(&mut res).await?;
println!("{}", String::from_utf8_lossy(&res));

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

License