2015-12-22 02:24:03 +03:00
|
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2022-11-29 02:35:50 +03:00
|
|
|
const device = require('azure-iot-device');
|
|
|
|
const Mqtt = require('./dist/mqtt.js').Mqtt;
|
|
|
|
const MqttWs = require('./dist/mqtt_ws.js').MqttWs;
|
2015-12-22 02:24:03 +03:00
|
|
|
|
2016-01-22 06:09:05 +03:00
|
|
|
/**
|
|
|
|
* The `azure-iot-device-mqtt` module provides support the MQTT protocol to the device [client]{@link module:azure-iot-device.Client} using secure sockets.
|
|
|
|
*
|
|
|
|
* @module azure-iot-device-mqtt
|
|
|
|
* @requires module:azure-iot-device
|
|
|
|
*/
|
|
|
|
|
2015-12-22 02:24:03 +03:00
|
|
|
module.exports = {
|
|
|
|
Mqtt: Mqtt,
|
2016-10-06 04:59:53 +03:00
|
|
|
MqttWs: MqttWs,
|
2015-12-22 02:24:03 +03:00
|
|
|
clientFromConnectionString: function (connectionString) {
|
|
|
|
return device.Client.fromConnectionString(connectionString, Mqtt);
|
|
|
|
}
|
2022-11-29 02:35:50 +03:00
|
|
|
};
|