0.4.2 • Published 4 years ago

@netology-group/mqtt-client v0.4.2

Weekly downloads
379
License
MIT
Repository
github
Last release
4 years ago

MQTT client

MQTT client implementation for JavaScript

Installation

npm install --save @netology-group/mqtt-client

Example

const client = new MQTTClient('ws://iot.eclipse.org:80/ws')

client.connect()

client.on(MQTTClient.events.MESSAGE, function (topic, message) {
  console.log('[message]', topic, message.toString())
  client.disconnect()
})

client.on(MQTTClient.events.CONNECT, function (event) {
  client.subscribe('test/topic/1/#', null, function (err, data) {
    client.publish('test/topic/1/2/3', 'Hello, MQTT!')
  })
})

Documentation

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

5 years ago

0.3.2-alpha.0

5 years ago

0.3.1

5 years ago

0.3.1-alpha.0

5 years ago

0.3.0-alpha.1

5 years ago

0.3.0-alpha.0

5 years ago