| Home | Libraries | People | FAQ | More

###### boost::mqtt5::mqtt_client::mqtt_client (2 of 3 overloads)

Constructs a Client with given parameters.

###### Synopsis

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

###### Template Parameters

Type | 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&>