pomelomqttconnector(pomelomqttconnector)基于MQTT,TCP和WS协议。
使用var MqttConnector = require('pomelo-mqtt-connector');// in pomelo app.configure setup mqtt connector configurationapp.configure('all', 'connector', function() { app.set('connectorConfig', { connector: MqttConnector, publishRoute: 'connector.mqttHandler.publish', subscribeRoute: 'connector.mqttHandler.subscribe', encode: MqttConnector.encode });});选项@param{Boolean}opts.distinctHost @param{Boolean}opts.timeout @param{Boolean}opts.setNoDelay @param{Boolean}opts.disconnectOnTimeout @param{String}opts.publishRoute @param{String}opts.subscribeRoute @param{String}opts.selfDefinedRoute
评论