Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
boost::mqtt5::mqtt_client::authenticator

Assign an authenticator that the Client will use for Enhanced Authentication on every connect to a Broker. Re-authentication can be initiated by calling re_authenticate.

Synopsis
template<
    typename Authenticator>
boost::mqtt5::mqtt_client&
authenticator(
    Authenticator&& authenticator);
Parameters

Name

Description

authenticator

Object that will be stored (move-constructed or by reference) and used for authentication. It needs to satisfy Authenticator concept.

Attention

This function has no effect while the Client is running. Call it before async_run, or after cancel or async_disconnect and before invoking async_run again.


PrevUpHomeNext