Asynchronous I/O that doesn’t get in your way, written in D
Module vibe.stream.tls
TLS stream implementation
TLSStream can be used to implement TLS communication on top of a TCP connection. The
TLSContextKind of an TLSStream determines if the TLS tunnel is established actively (client) or
passively (server).
Example
A simple TLS client
import vibe.core.net;
import vibe.stream.tls;
void sendTLSMessage()
{
auto conn = connectTCP("127.0.0.1", 1234);
auto sslctx = createTLSContext(TLSContextKind.client);
auto stream = createTLSStream(conn, sslctx);
stream.write("Hello, World!");
stream.finalize();
conn.close();
}