From 5b69c1100b105644210c66f8bceabba8a357884c Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Fri, 12 Sep 2014 22:39:24 +0100 Subject: [PATCH] [440169] Add information on "protocol" argument. 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index 3a95509..264f782 100755 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -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.') -- 2.39.5