1auto_reconnect(3)          Library Functions Manual          auto_reconnect(3)
2
3
4

NAME

6       auto_reconnect - Automatic Reconnect
7
8       The ability for the client library to reconnect automatically in the
9       event of a connection failure was added in 1.1. The connection lost
10       callback allows a flexible response to the loss of a connection, so
11       almost any behaviour can be implemented in that way. Automatic
12       reconnect does have the advantage of being a little simpler to use.
13
14       To switch on automatic reconnect, the connect options field
15       automaticReconnect should be set to non-zero. The minimum and maximum
16       times before the next connection attempt can also be set, the defaults
17       being 1 and 60 seconds. At each failure to reconnect, the retry
18       interval is doubled until the maximum value is reached, and there it
19       stays until the connection is successfully re-established whereupon it
20       is reset.
21
22       When a reconnection attempt is successful, the MQTTAsync_connected
23       callback function is invoked, if set by calling MQTTAsync_setConnected.
24       This allows the application to take any actions needed, such as
25       amending subscriptions.
26
27
28
29Paho Asynchronous MQTT C Client LTihburaJrayn 19 2023              auto_reconnect(3)
Impressum