]> git.michaelhowe.org Git - packages/p/paho-mqtt.git/commitdiff
More mosq->paho name changes.
authorRoger Light <roger@atchoo.org>
Mon, 17 Jun 2013 08:36:28 +0000 (09:36 +0100)
committerRoger Light <roger@atchoo.org>
Mon, 3 Feb 2014 21:16:18 +0000 (21:16 +0000)
examples/sub.py

index f013247238223f8d97147ea912e76f129e2e5f5a..05de62a5763c174627fcbee90ed25a6dbd575cf7 100755 (executable)
@@ -40,23 +40,23 @@ if cmd_subfolder not in sys.path:
 
 import paho.mqtt.client as mqtt
 
-def on_connect(mosq, obj, rc):
+def on_connect(mqttc, obj, rc):
     print("rc: "+str(rc))
 
-def on_message(mosq, obj, msg):
+def on_message(mqttc, obj, msg):
     print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload))
 
-def on_publish(mosq, obj, mid):
+def on_publish(mqttc, obj, mid):
     print("mid: "+str(mid))
 
-def on_subscribe(mosq, obj, mid, granted_qos):
+def on_subscribe(mqttc, obj, mid, granted_qos):
     print("Subscribed: "+str(mid)+" "+str(granted_qos))
 
-def on_log(mosq, obj, level, string):
+def on_log(mqttc, obj, level, string):
     print(string)
 
 # If you want to use a specific client id, use
-# mqttc = mosquitto.Mosquitto("client-id")
+# mqttc = mqtt.Client("client-id")
 # but note that the client id must be unique on the broker. Leaving the client
 # id parameter empty will generate a random id for you.
 mqttc = mqtt.Client()