@tuby/mqttclient
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

#@tuby/mqttclient

##Installation With NPM:

$ npm install @tuby/mqttclient

With Yarn:

$ yarn @tuby/mqttclient

##Update With NPM:

$ npm update @tuby/mqttclient

With Yarn:

$ yarn upgrade @tuby/mqttclient

Usage

import {WebAPI} from '@tuby/mqttclient'

var mqttclient = new MQTTClient({
    "url": "ws://192.168.19.41:8083/mqtt",
    "onConnected":function(){
        console.log("mqtt connected")
    },
    "onDisconnected":function(){
        console.log("mqtt disconnected")
    },
    "onConnectError":function(err){
        console.log(err)
    }
});
mqttclient.subTopic("aaa",function(message){
    //let jmessage = eval('(' + message + ')');
    console.log("aaa get",message+"")
})
mqttclient.pubTopic("aaa","kkk")

Testing & Dev

npm run dev
npm run demo

📜 Changelog

Detailed changes for each release are documented in the CHANGELOG.md

©️ License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @tuby/mqttclient

Weekly Downloads

0

Version

0.0.8

License

MIT

Unpacked Size

16.4 kB

Total Files

6

Last publish

Collaborators

  • tubycn