定制 luzhuqun/laravel-mqtt-publish 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

luzhuqun/laravel-mqtt-publish

Composer 安装命令:

composer require luzhuqun/laravel-mqtt-publish

包简介

A simple Laravel 5 mqtt publisher

README 文档

README

Mqtt is used to publish messages from backend to andriod.

Getting start

composer require luzhuqun/laravel-mqtt-publish

How to use

use Lzq\Mqtt\SamMessage;
use Lzq\Mqtt\SamConnection;

$conn = new SAMConnection();//create a new connection object

$conn->connect('mqtt', array('SAM_HOST' => '192.168.10.147', 'SAM_PORT' => '1883'));//start initialise the connection

$msgCpu = new SAMMessage('hehe');//create a new MQTT message with the output of the shell command as the body

$conn->send('topic://'.'tokudu/ab7867d9fd60db65', $msgCpu);//send the message on the topic cpu

$conn->disconnect();

Learn more

A complet mqtt service incluede publisher, service and subscriber.

service

mosquitto

subscriber

AndroidPushNotificationsDemo

统计信息

  • 总下载量: 9.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 21
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 21
  • Watchers: 2
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-22