socket.io-mqtt

Socket Io Adapter for MQTT

Usage no npm install needed!

<script type="module">
  import socketIoMqtt from 'https://cdn.skypack.dev/socket.io-mqtt';
</script>

README

socket.io-mqtt

Build Status NPM version

README TO BE UPDATED

The Socket.io MQTT adapter has been built by forking the redis adapter.

Development just started.

How to use

const io = require('socket.io')(3000);
const mqttAdapter = require('socket.io-mqtt');
io.adapter(mqttAdapter('mqtt://localhost:1883', {}));

mqttAdapter is a function of mqtt package, view detail in bellow https://www.npmjs.com/package/mqtt

All sdk function, detail in: https://socket.io/docs/rooms-and-namespaces/

License

MIT