diff --git a/src/paho-mqtt.js b/src/paho-mqtt.js index 9ca3d37..755a7cf 100644 --- a/src/paho-mqtt.js +++ b/src/paho-mqtt.js @@ -55,7 +55,7 @@ * Example: * *
-var client = new Paho.MQTT.Client(location.hostname, Number(location.port), "clientId");
+var client = new Paho.Client(location.hostname, Number(location.port), "clientId");
 client.onConnectionLost = onConnectionLost;
 client.onMessageArrived = onMessageArrived;
 client.connect({onSuccess:onConnect});
@@ -64,7 +64,7 @@ function onConnect() {
   // Once a connection has been made, make a subscription and send a message.
   console.log("onConnect");
   client.subscribe("/World");
-  var message = new Paho.MQTT.Message("Hello");
+  var message = new Paho.Message("Hello");
   message.destinationName = "/World";
   client.send(message);
 };