PrevUpHomeNext
mqtt_client::mqtt_client (2 of 3 overloads)

Constructs a Client with given parameters.

template <
    typename ExecutionContext,
    std::enable_if_t< std::is_convertible_v< ExecutionContext &, asio::execution_context & >, bool > = true
>
mqtt_client(
    ExecutionContext & context,
    tls_context_type tls_context = {},
    logger_type logger = {}
);
Description
Template Parameters

Name

Description

ExecutionContext

Type of a concrete execution context.

Parameters

Name

Description

context

Execution context whose executor will be associated with the Client.

tls_context

A context object used in TLS/SSL connection.

logger

An object satisfying the LoggerType concept used to log events within the Client.

Precondition
std::is_convertible_v<ExecutionContext&, asio::execution_context&>

PrevUpHomeNext