[−][src]Module opentls::async_io
This is supported on crate features
io-tokio
or io-async-std
only.Async TLS streams with OpenSSL.
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 = opentls::async_io::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
Host | The host part of a domain (without scheme, port and path). |
TlsAcceptor | A wrapper around a |
TlsConnector | Connect a client to a remote server. |
TlsStream | A stream managing a TLS session. |
Functions
accept | Accept an incoming connection. |
connect | Connect a client to a remote server. |