Web浏览器可以使用MQTT吗? [英] Can a web browser use MQTT?

查看:528
本文介绍了Web浏览器可以使用MQTT吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在考虑将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个选择

  1. IBM的MQ 7.5附带了websockets支持,您可以找到详细信息此处运行.
  1. IBM's MQ 7.5 comes with websockets support, you can find details here.
  2. 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吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆