Download the PHP package hyperf/mqtt-server-incubator without Composer
On this page you can find all versions of the php package hyperf/mqtt-server-incubator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package mqtt-server-incubator
MQTT Server
安装
配置服务
启动服务,我们就可以简单的使用 MQTT 服务了。
自定义事件
组件增加了可以监听 MQTT 服务各个阶段的事件,比如我们写一个 MQTTConnectHandler
用来监听客户端连接。
PUBLISH, SUBSCRIBE 和 UNSUBSCRIBE 三个事件,需要自行实现
重启服务,连接 MQTT 时,便可以得到以下输出。
组件支持的事件列表如下:
事件 | 备注 |
---|---|
MQTTConnect | 客户端连接时触发 |
MQTTDisconnect | 客户端断开连接时触发 |
MQTTPingReq | |
MQTTPublish | 客户端发布消息时触发 |
MQTTSubscribe | 客户端订阅时触发 |
MQTTUnsubscribe | 客户端取消订阅时触发 |
注解支持参数如下
参数 | 备注 |
---|---|
server | 指定当前事件对应的服务名 |
type | 事件类型 |
priority | 事件优先级,越大越先执行,默认的事件优先级为 0 |
All versions of mqtt-server-incubator with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
hyperf/cache Version ^3.0
hyperf/codec Version ^3.0
hyperf/contract Version ^3.0
hyperf/coordinator Version ^3.0
hyperf/di Version ^3.0
hyperf/http-server Version ^3.0
simps/mqtt Version ^1.3
hyperf/cache Version ^3.0
hyperf/codec Version ^3.0
hyperf/contract Version ^3.0
hyperf/coordinator Version ^3.0
hyperf/di Version ^3.0
hyperf/http-server Version ^3.0
simps/mqtt Version ^1.3
The package hyperf/mqtt-server-incubator contains the following files
Loading the files please wait ....