]> git.michaelhowe.org Git - packages/p/paho-mqtt.git/commitdiff
[440169] Add information on "protocol" argument.
authorRoger A. Light <roger@atchoo.org>
Fri, 12 Sep 2014 21:39:24 +0000 (22:39 +0100)
committerRoger A. Light <roger@atchoo.org>
Fri, 12 Sep 2014 21:39:24 +0000 (22:39 +0100)
Document the "protocol" argument to the client constructor. Closes
 #440169. Thanks to Andy Piper.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=440169
Change-Id: I46467156237235adff41eda0bf98c26bfba083bf

src/paho/mqtt/client.py

index 3a9550928e52f3af53058d92101ddce3cf9f458d..264f782f1c883696c98be4e158d7a0f329bf3412 100755 (executable)
@@ -407,6 +407,13 @@ class Client(object):
         userdata is user defined data of any type that is passed as the "userdata"
         parameter to callbacks. It may be updated at a later point with the
         user_data_set() function.
+
+        The protocol argument allows explicit setting of the MQTT version to
+        use for this client. Can be paho.mqtt.client.MQTTv311 (v3.1.1) or
+        paho.mqtt.client.MQTTv31 (v3.1), with the default being v3.1.1. If the
+        broker reports that the client connected with an invalid protocol
+        version, the client will automatically attempt to reconnect using v3.1
+        instead.
         """
         if not clean_session and (client_id == "" or client_id is None):
             raise ValueError('A client id must be provided if clean session is False.')