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
393538fa
Commit
393538fa
authored
Aug 12, 2015
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation, including potential "race"
Bug: 444093
parent
e93f8006
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
MQTTAsync.h
src/MQTTAsync.h
+31
-2
No files found.
src/MQTTAsync.h
View file @
393538fa
...
...
@@ -913,10 +913,29 @@ DLLExport int MQTTAsync_sendMessage(MQTTAsync handle, const char* destinationNam
*/
DLLExport
int
MQTTAsync_getPendingTokens
(
MQTTAsync
handle
,
MQTTAsync_token
**
tokens
);
/**
* Tests whether a request corresponding to a token is complete.
*
* @param handle A valid client handle from a successful call to
* MQTTAsync_create().
* @param token An ::MQTTAsync_token associated with a request.
* @return 1 if the request has been completed, 0 if not.
*/
#define MQTTASYNC_TRUE 1
DLLExport
int
MQTTAsync_isComplete
(
MQTTAsync
handle
,
MQTTAsync_token
dt
);
DLLExport
int
MQTTAsync_isComplete
(
MQTTAsync
handle
,
MQTTAsync_token
token
);
DLLExport
int
MQTTAsync_waitForCompletion
(
MQTTAsync
handle
,
MQTTAsync_token
dt
,
unsigned
long
timeout
);
/**
* Waits for a request corresponding to a token to complete.
*
* @param handle A valid client handle from a successful call to
* MQTTAsync_create().
* @param token An ::MQTTAsync_token associated with a request.
* @param timeout the maximum time to wait for completion, in milliseconds
* @return ::MQTTASYNC_SUCCESS if the request has been completed in the time allocated,
* ::MQTTASYNC_FAILURE if not.
*/
DLLExport
int
MQTTAsync_waitForCompletion
(
MQTTAsync
handle
,
MQTTAsync_token
token
,
unsigned
long
timeout
);
/**
...
...
@@ -1012,10 +1031,20 @@ DLLExport MQTTAsync_nameValue* MQTTAsync_getVersionInfo();
* The client application runs on several threads.
* Processing of handshaking and maintaining
* the network connection is performed in the background.
* This API is thread safe: functions may be called by multiple application
* threads.
* Notifications of status and message reception are provided to the client
* application using callbacks registered with the library by the call to
* MQTTAsync_setCallbacks() (see MQTTAsync_messageArrived(),
* MQTTAsync_connectionLost() and MQTTAsync_deliveryComplete()).
* In addition, some functions allow success and failure callbacks to be set
* for individual requests, in the ::MQTTAsync_responseOptions structure. Applications
* can be written as a chain of callback functions. Note that it is a theoretically
* possible but unlikely event, that a success or failure callback could be called
* before function requesting the callback has returned. In this case the token
* delivered in the callback would not yet be known to the application program (see
* Race condition for MQTTAsync_token in MQTTAsync.c
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=444093)
*
* @page wildcard Subscription wildcards
* Every MQTT message includes a topic that classifies it. MQTT servers use
...
...
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