enochzg/yii2-mosquitto
Composer 安装命令:
composer require enochzg/yii2-mosquitto
包简介
yii2-mosquitto
关键字:
README 文档
README
Installation
The component is based on php-mosquitto extension. The download link is https://github.com/mgdm/Mosquitto-PHP.
composer require enochzg/yii2-mosquitto
Usage
Add target class in your project config:
'components' => [ 'mosquitto' => [ 'class' => 'enochzg\mosquitto\Mosquitto', 'host' => '127.0.0.1', 'port' => '1883', 'keepalive' => 60, 'cafile' => '[your/cert/path]/ca.crt', 'certfile' => '[your/cert/path]/client.crt', 'keyfile' => '[your/cert/path]/client.key', ], //...... ]
e.g.
yii::$app->mosquitto->publish('1', 'message', 2);
统计信息
- 总下载量: 1.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-03-15