<i id='Yjm8P'><tr id='Yjm8P'><dt id='Yjm8P'><q id='Yjm8P'><span id='Yjm8P'><b id='Yjm8P'><form id='Yjm8P'><ins id='Yjm8P'></ins><ul id='Yjm8P'></ul><sub id='Yjm8P'></sub></form><legend id='Yjm8P'></legend><bdo id='Yjm8P'><pre id='Yjm8P'><center id='Yjm8P'></center></pre></bdo></b><th id='Yjm8P'></th></span></q></dt></tr></i><div id='Yjm8P'><tfoot id='Yjm8P'></tfoot><dl id='Yjm8P'><fieldset id='Yjm8P'></fieldset></dl></div>

<small id='Yjm8P'></small><noframes id='Yjm8P'>

  • <legend id='Yjm8P'><style id='Yjm8P'><dir id='Yjm8P'><q id='Yjm8P'></q></dir></style></legend>

    • <bdo id='Yjm8P'></bdo><ul id='Yjm8P'></ul>

      <tfoot id='Yjm8P'></tfoot>

        使用 PHP 在 Laravel 上的 mqtt

        mqtt on Laravel with PHP(使用 PHP 在 Laravel 上的 mqtt)

        <i id='xrQWl'><tr id='xrQWl'><dt id='xrQWl'><q id='xrQWl'><span id='xrQWl'><b id='xrQWl'><form id='xrQWl'><ins id='xrQWl'></ins><ul id='xrQWl'></ul><sub id='xrQWl'></sub></form><legend id='xrQWl'></legend><bdo id='xrQWl'><pre id='xrQWl'><center id='xrQWl'></center></pre></bdo></b><th id='xrQWl'></th></span></q></dt></tr></i><div id='xrQWl'><tfoot id='xrQWl'></tfoot><dl id='xrQWl'><fieldset id='xrQWl'></fieldset></dl></div>
                <tbody id='xrQWl'></tbody>
              <tfoot id='xrQWl'></tfoot>
            1. <legend id='xrQWl'><style id='xrQWl'><dir id='xrQWl'><q id='xrQWl'></q></dir></style></legend>
                <bdo id='xrQWl'></bdo><ul id='xrQWl'></ul>

                <small id='xrQWl'></small><noframes id='xrQWl'>

                  本文介绍了使用 PHP 在 Laravel 上的 mqtt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在我的 raspberry 和我的 Ubuntu 上使用 MQTT.我使用终端作为开始订阅者和发布者,它运行良好.但是现在我想创建一个具有此功能的网站(使用 laravel).我用谷歌搜索了它,但我没有发现任何有趣的东西.有可能吗?怎么做?

                  I'm using the MQTT on my raspberry and on my Ubuntu. I use terminal for start subscriber and publisher and it works so good. But now I want to create a website (using laravel) with this features. I googled it, but I don't find anything interesting. Is it possible to do and how?

                  推荐答案

                  与 HTTP 不同,MQTT 通常用于在应用程序进程和 MQTT 服务器之间打开长时间运行的连接.

                  Unlike with HTTP, MQTT is typically used by opening a long-running connection between an application process and a MQTT server.

                  虽然完全有可能打开一个连接,发布一条消息,然后再次关闭套接字,但它并不能真正用于订阅消息流.

                  While it is perfectly possible to open a connection, publish a single message and then close the socket again, it doesn't really work for subscribing to a stream of messages.

                  PHP 的典型操作模式是启动一个进程,等待 HTTP 连接,处理请求,然后启动一个新进程.这与具有长时间运行进程的典型 MQTT 模式不太匹配.

                  PHP's typically mode of operation is to start a process, wait for an HTTP connection, handle the request and then start a new process. This doesn't fit well with the typical MQTT mode of having a long-running process.

                  随着人们使用 PHP 内置 HTTP 服务器,这种情况开始发生变化.我不确定 Laravel 是否提供了一种机制来在处理请求之间保持变量/TCP 连接.

                  This had started to change with people using the PHP built-in HTTP server. I am not sure if Laravel provides a mechanism to keep variables/TCP connections in place between handling requests.

                  或者,可以在长时间运行的 CLI PHP 脚本中订阅 MQTT 主题并将其保留在本地(例如数据库、KV 存储、memcache、redis),然后提供来自数据存储的数据.

                  Alternatively it is possible to subscribe to a MQTT topic in a long-running CLI PHP script and persisting it locally (for example a database, KV store, memcache, redis) and then serving the data from the datastore.

                  这在很大程度上取决于您要实现的目标.

                  It depends a lot on what you are trying to achieve.

                  这篇关于使用 PHP 在 Laravel 上的 mqtt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <bdo id='ljolk'></bdo><ul id='ljolk'></ul>
                    <i id='ljolk'><tr id='ljolk'><dt id='ljolk'><q id='ljolk'><span id='ljolk'><b id='ljolk'><form id='ljolk'><ins id='ljolk'></ins><ul id='ljolk'></ul><sub id='ljolk'></sub></form><legend id='ljolk'></legend><bdo id='ljolk'><pre id='ljolk'><center id='ljolk'></center></pre></bdo></b><th id='ljolk'></th></span></q></dt></tr></i><div id='ljolk'><tfoot id='ljolk'></tfoot><dl id='ljolk'><fieldset id='ljolk'></fieldset></dl></div>
                    <legend id='ljolk'><style id='ljolk'><dir id='ljolk'><q id='ljolk'></q></dir></style></legend>
                  • <small id='ljolk'></small><noframes id='ljolk'>

                      • <tfoot id='ljolk'></tfoot>
                            <tbody id='ljolk'></tbody>