@@ -869,30 +869,19 @@ present in the CraftBukkit classpath. To use this module, you should
869869 messages to/from a Net-enabled Arduino or any other device which uses
870870 the [ MQTT protocol] [ mqtt ]
871871
872-
873- var mqtt = require('sc-mqtt');
874-
875- // create a new client
876-
877- var client = mqtt.client( 'tcp://localhost:1883', 'uniqueClientId' );
878-
879- // connect to the broker
880-
881- client.connect( { keepAliveInterval: 15 } );
882-
883- // publish a message to the broker
884-
885- client.publish( 'minecraft', 'loaded' );
886-
887- // subscribe to messages on 'arduino' topic
888-
889- client.subscribe( 'arduino' );
890-
891- // do something when an incoming message arrives...
892-
893- client.onMessageArrived( function( topic, message ) {
894- console.log( 'Message arrived: topic=' + topic + ', message=' + message );
895- });
872+ var mqtt = require('sc-mqtt');
873+ // create a new client
874+ var client = mqtt.client( 'tcp://localhost:1883', 'uniqueClientId' );
875+ // connect to the broker
876+ client.connect( { keepAliveInterval: 15 } );
877+ // publish a message to the broker
878+ client.publish( 'minecraft', 'loaded' );
879+ // subscribe to messages on 'arduino' topic
880+ client.subscribe( 'arduino' );
881+ // do something when an incoming message arrives...
882+ client.onMessageArrived( function( topic, message ) {
883+ console.log( 'Message arrived: topic=' + topic + ', message=' + message );
884+ });
896885
897886The ` sc-mqtt ` module provides a very simple minimal wrapper around the
898887[ Eclipse Paho MQTT Version 3 Client] [ pahodocs ] java-based MQTT
0 commit comments