问题描述
我们正在考虑将MQTT用作我们正在构建的新设备上的消息传递协议.我们还需要该设备的Web界面.有谁知道您是否可以实现一个使用MQTT的浏览器客户端应用程序(无需其他插件)?
We are looking at using MQTT as the messaging protocol on a new device we're building. We'd also like a web interface for the device. Does anyone know if you can implement a browser client app (without additional plugins) that talks MQTT?
推荐答案
是的,正如Steve-o的评论中提到的,通过websocket进行MQTT很有可能.
Yes, as mentioned in Steve-o's comment MQTT via websockets is very possible.
目前有2个选择
- IBM's MQ 7.5 comes with websockets support, you can find details here.
- The Mosquitto broker has a javascript client with an example running here.
要回答第二个问题,lighttpd有一个websockets模块,可用于将其转发给具有详细信息的现有代理这里.
To answer your second question lighttpd has a websockets module that can be used to do forwarding to an existing broker with details here.
我无法为Apache找到任何不需要您编写自己的库来进行转发的内容.
I've not been able to find anything for Apache that doesn't need you to write your own library to do the forwarding.
这篇关于Web浏览器可以使用MQTT吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!