boost::corosio::tls_stream

Abstract base class for TLS streams.

Synopsis

class tls_stream;

Description

This class provides a runtime‐polymorphic interface for TLS implementations. Derived classes (openssl_stream, wolfssl_stream) implement the virtual functions to provide backend‐specific TLS functionality.

Unlike io_stream which represents OS‐level I/O completed by the kernel, TLS streams are coroutine‐based: their operations are implemented as coroutines that orchestrate sub‐operations on the underlying stream.

The non‐virtual template wrappers (read_some, write_some) satisfy the capy::Stream concept, enabling TLS streams to be used anywhere a Stream is expected.

Thread Safety

Distinct objects: Safe. Shared objects: Unsafe.

Enums

Name

Description

handshake_type

Different handshake types.

Member Functions

Name

Description

tls_stream [constructor] [deleted]

Copy constructor

~tls_stream [destructor] [virtual]

Destructor.

operator= [deleted]

Copy assignment operator

handshake [virtual]

Perform the TLS handshake asynchronously.

name [virtual]

Returns the name of the TLS backend.

next_layer [virtual]

next_layer overloads

read_some

Initiate an asynchronous read operation.

shutdown [virtual]

Perform a graceful TLS shutdown asynchronously.

write_some

Initiate an asynchronous write operation.

Protected Member Functions

Name

Description

tls_stream [constructor]

Default constructor

do_read_some [virtual]

Virtual read implementation.

do_write_some [virtual]

Virtual write implementation.

Derived Classes

Name Description

openssl_stream

A TLS stream using OpenSSL.

wolfssl_stream

A TLS stream using WolfSSL.

See Also

openssl_stream, wolfssl_stream

Created with MrDocs