template < typename CompletionToken = typename asio::default_completion_token<executor_type>::type > decltype(auto) async_run( CompletionToken && token = {} );
Name |
Description |
---|---|
token |
Completion token that will be used to produce a completion handler. The handler will be invoked when the operation completes. |
The handler signature for this operation:
void (async_mqtt5::error_code
)
The asynchronous operation will complete with boost::asio::error::operation_aborted
when the client is cancelled by calling mqtt_client::async_disconnect
, mqtt_client::cancel
, destruction or if a non-recoverable
error happens during a connection attempt (e.g. access denied).
The list of all possible error codes that this operation can finish with:
boost::asio::error::operation_aborted
This asynchronous operation supports cancellation for the following boost::asio::cancellation_type
values:
cancellation_type::terminal
- invokes mqtt_client::cancel