All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.mqtt.examples.client.simple-both.js Maven / Gradle / Ivy

The newest version!
'use strict'

var mqtt = require('../..')
var client = mqtt.connect()

// or var client = mqtt.connect({ port: 1883, host: '192.168.1.100', keepalive: 10000});

client.subscribe('presence')
client.publish('presence', 'bin hier')
client.on('message', function (topic, message) {
  console.log(message)
})
client.end()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy