https://github.com/xiaoping6688/mqtt-socket
Eclipse Paho MQTT Client 封装,实现重连、队列和日志功能等
https://github.com/xiaoping6688/mqtt-socket
mqtt-aliyun mqtt-client mqtt-js
Last synced: over 1 year ago
JSON representation
Eclipse Paho MQTT Client 封装,实现重连、队列和日志功能等
- Host: GitHub
- URL: https://github.com/xiaoping6688/mqtt-socket
- Owner: xiaoping6688
- Created: 2017-05-27T10:01:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T03:35:35.000Z (about 9 years ago)
- Last Synced: 2025-01-21T14:45:29.904Z (over 1 year ago)
- Topics: mqtt-aliyun, mqtt-client, mqtt-js
- Language: JavaScript
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mqtt-socket
Eclipse Paho MQTT Client 封装 (javascript),实现重连、队列和日志功能,支持node module引入;
> 该例服务端使用阿里云MQTT;另外推荐使用[MQTT.js](https://github.com/mqttjs/MQTT.js):The MQTT client for Node.js and the browser
## Usage
```js
// for client
mqtt.connect(MQTT_CONIFG, onConnected, onReceived);
mqtt.sendToAll(110, {});
mqtt.sendToUser(YourDevID, 110, {});
// for server
使用阿里云的[MQTT 物联套件](https://help.aliyun.com/document_detail/42419.html)
//=> @see test.html
```