WebSocket Support Comes to the wolfMQTT Broker

wolfMQTT clients have been able to speak MQTT over WebSocket for a while. Now the broker can too.

Starting with the latest code on master, the wolfMQTT broker accepts WebSocket connections alongside standard TCP – no proxy, no bridge, no extra infrastructure. Pass -w to open a WebSocket listener:

./src/broker -p 1883 -w 9001

This makes it straightforward to connect browser-based or Node.js MQTT clients directly to a wolfMQTT broker. TLS works on both transports simultaneously.

The implementation uses libwebsockets and is enabled at build time with –enable-websocket. If you’re building wolfSSL alongside libwebsockets, add –enable-opensslcoexist to avoid header conflicts.

Give it a try and let us know how it goes on GitHub or by sending us an email to support@wolfssl.com.

If you have questions about any of the above, please contact us at facts@wolfssl.com or call us at +1 425 245 8247.

Download wolfSSL Now