pomelo mqtt connector (pomelo mqtt connector) 基于 MQTT,TCP 和 WS 协议。
var MqttConnector = require('pomelo-mqtt-connector'); // in pomelo app.configure setup mqtt connector configuration app.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