Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This version of Boost is under active development. You are currently in the develop branch. The current version is 1.92.0.
Assign the maximum time interval that is permitted to elapse between two transmissions from the Client.
boost::mqtt5::mqtt_client&
keep_alive(
uint16_t seconds);
A non-zero value initiates a process of sending a PINGREQ packet every seconds. If this function is not invoked,
the Client assumes a Keep Alive
interval of 60 seconds.
|
Name |
Description |
|---|---|
|
|
Time interval in seconds. |
If the Server sends a Server Keep
Alive, the Client will
send a PINGREQ packet every Server Keep
Alive seconds.
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.