Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
082f582c
Commit
082f582c
authored
Jun 29, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation for auto reconnect and offline publish
parent
13471fc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
MQTTAsync.h
src/MQTTAsync.h
+35
-0
No files found.
src/MQTTAsync.h
View file @
082f582c
...
...
@@ -75,6 +75,8 @@
* <li>@ref wildcard</li>
* <li>@ref qos</li>
* <li>@ref tracing</li>
* <li>@ref auto_reconnect</li>
* <li>@ref offline_publish</li>
* </ul>
* @endcond
*/
...
...
@@ -1169,6 +1171,39 @@ DLLExport MQTTAsync_nameValue* MQTTAsync_getVersionInfo(void);
* Race condition for MQTTAsync_token in MQTTAsync.c
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=444093)
*
* @page auto_reconnect Automatic Reconnect
* The ability for the client library to reconnect automatically in the event
* of a connection failure was added in 1.1. The connection lost callback
* allows a flexible response to the loss of a connection, so almost any
* behaviour can be implemented in that way. Automatic reconnect does have the
* advantage of being a little simpler to use.
*
* To switch on automatic reconnect, the connect options field
* automaticReconnect should be set to non-zero. The minimum and maximum times
* before the next connection attempt can also be set, the defaults being 1 and
* 60 seconds. At each failure to reconnect, the retry interval is doubled until
* the maximum value is reached, and there it stays until the connection is
* successfully re-established whereupon it is reset.
*
* When a reconnection attempt is successful, the ::MQTTAsync_connected callback
* function is invoked, if set by calling ::MQTTAsync_setConnected. This allows
* the application to take any actions needed, such as amending subscriptions.
*
* @page offline_publish Publish While Disconnected
* This feature was not originally available because with persistence enabled,
* messages could be stored locally without ever knowing if they could be sent.
* The client application could have created the client with an erroneous broker
* address or port for instance.
*
* To enable messages to be published when the application is disconnected
* ::MQTTAsync_createWithOptions must be used instead of ::MQTTAsync_create to
* create the client object. The ::createOptions field sendWhileDisconnected
* must be set to non-zero, and the maxBufferedMessages field set as required -
* the default being 100.
*
* ::MQTTAsync_getPendingTokens can be called to return the ids of the messages
* waiting to be sent, or for which the sending process has not completed.
*
* @page wildcard Subscription wildcards
* Every MQTT message includes a topic that classifies it. MQTT servers use
* topics to determine which subscribers should receive messages published to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment