PrevUpHomeNext
mqtt_client::will

Assign a will Message.

mqtt_client & will(
    will will
);
Description

The will Message that the Broker should publish after the Network Connection is closed and it is not closed normally.

[Important] Important

This function takes action when the client is in a non-operational state, meaning the mqtt_client::async_run function has not been invoked. Furthermore, you can use this function after the mqtt_client::cancel function has been called, before the mqtt_client::async_run function is invoked again.


PrevUpHomeNext