Skip to content

Commit

Permalink
Removing incorrect slash at start of topics
Browse files Browse the repository at this point in the history
There should not be a slash at the start of any topics.
  • Loading branch information
jpwsutton authored Nov 15, 2016
1 parent 4d2530e commit e3a7127
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The client should work in any browser fully supporting WebSockets, [http://caniu

## Getting Started

The included code below is a very basic sample that connects to a server using WebSockets and subscribes to the topic ```/World```, once subscribed, it then publishes the message ```Hello``` to that topic. Any messages that come into the subscribed topic will be printed to the Javascript console.
The included code below is a very basic sample that connects to a server using WebSockets and subscribes to the topic ```World```, once subscribed, it then publishes the message ```Hello``` to that topic. Any messages that come into the subscribed topic will be printed to the Javascript console.

This requires the use of a broker that supports WebSockets natively, or the use of a gateway that can forward between WebSockets and TCP.

Expand All @@ -87,9 +87,9 @@ client.connect({onSuccess:onConnect});
function onConnect() {
// Once a connection has been made, make a subscription and send a message.
console.log("onConnect");
client.subscribe("/World");
client.subscribe("World");
message = new Paho.MQTT.Message("Hello");
message.destinationName = "/World";
message.destinationName = "World";
client.send(message);
}

Expand Down

0 comments on commit e3a7127

Please sign in to comment.