Crate async_native_tls[−][src]
Expand description
Async TLS streams
Examples
To connect as a client to a remote server:
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));
Structs
An X509 certificate.
An error returned from the TLS implementation.
The host part of a domain (without scheme, port and path).
A cryptographic identity.
A wrapper around a native_tls::TlsAcceptor
, providing an async accept
method.
Connect a client to a remote server.
A stream managing a TLS session.
Enums
An error returned from creating an acceptor.
SSL/TLS protocol versions.
Functions
Type Definitions
A typedef of the result-type returned by many methods.