This document describes the source code for the `Eclipse Paho <http://eclipse.org/paho/>`_ MQTT Python client library, which implements versions 3.1 and 3.1.1 of the MQTT protocol.
...
...
@@ -32,7 +32,7 @@ Contents
* `Multiple`_
* `Subscribe`_
* `Simple`_
* `Calback`_
* `Using Callback`_
* `Reporting bugs`_
* `More information`_
...
...
@@ -58,14 +58,14 @@ To obtain the full code, including examples and tests, you can clone the git rep
Once you have the code, it can be installed from your repository as well:
::
cd org.eclipse.paho.mqtt.python
cd paho.mqtt.python
python setup.py install
Usage and API
...
...
@@ -163,8 +163,8 @@ transport
"tcp" to use raw TCP.
Example
.......
Constructor Example
...................
::
...
...
@@ -182,8 +182,8 @@ reinitialise()
The ``reinitialise()`` function resets the client to its starting state as if it had just been created. It takes the same arguments as the ``Client()`` constructor.
Example
.......
Reinitialise Example
....................
::
...
...
@@ -220,6 +220,7 @@ message_retry_set()
'''''''''''''''''''
::
message_retry_set(retry)
Set the time in seconds before a message with QoS>0 is retried, if the broker does not respond.
...
...
@@ -281,6 +282,7 @@ user_data_set()
'''''''''''''''
::
user_data_set(userdata)
Set the private user data that will be passed to callbacks when events are generated. Use this for your own purpose to support your application.
a list of messages to publish. Each message is either a dict or a tuple.
...
...
@@ -1065,8 +1069,8 @@ msgs
See ``single()`` for the description of ``hostname``, ``port``, ``client_id``, ``keepalive``, ``will``, ``auth``, ``tls``, ``protocol``, ``transport``.
Example
'''''''
Publish Multiple Example
''''''''''''''''''''''''
::
...
...
@@ -1098,8 +1102,8 @@ blocking function.
protocol=mqtt.MQTTv311)
Function arguments
''''''''''''''''''
Simple Subscribe Function arguments
'''''''''''''''''''''''''''''''''''
topics
the only required argument is the topic string to which the client will
...
...
@@ -1166,8 +1170,8 @@ protocol
choose the version of the MQTT protocol to use. Use either ``MQTTv31`` or ``MQTTv311``.