| Home | Libraries | People | FAQ | More

#### TlsContext concept

`TlsContext` represents an object that defines the user's configuration for establishing TLS/SSL connections. If TLS/SSL is not required, this parameter defaults to `std::monostate`.

The ``mqtt_client`` treats the `TlsContext` object as an opaque entity. It is primarily utilized when creating the underlying transport stream and is not directly manipulated by the ``mqtt_client``.

For instance, establishing a secure connection using using `boost::asio::ssl::stream<`boost::asio::ip::tcp::socket`>` requires `boost::asio::ssl::context` as the `TlsContext` type. An example of this can be found in the hello_world_over_tls.cpp example.