Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
boost::mqtt5::mqtt_client::async_run

Start the Client.

Synopsis
template<
    typename CompletionToken = typename asio::default_completion_token<boost::mqtt5::mqtt_client::executor_type>::type>
decltype(auto)
async_run(
    CompletionToken&& token = {});
Parameters

Name

Description

token

Completion token that will be used to produce a completion handler. The handler will be invoked when the operation completes.

Handler signature

The handler signature for this operation:

void (boost::mqtt5::error_code)
Completion condition

The asynchronous operation will complete with boost::asio::error::operation_aborted when the client is cancelled by calling async_disconnect, cancel, destruction or if a non-recoverable error happens during a connection attempt (e.g. access denied).

Error codes

The list of all possible error codes that this operation can finish with:

Per-Operation Cancellation

This asynchronous operation supports cancellation for the following boost::asio::cancellation_type values:


PrevUpHomeNext