drmer / mqtt-client
Mqtt client in PHP
v0.2
2018-12-03 01:19 UTC
Requires
- php: >=5.6.0
- drmer/mqtt-packet: ^0.2
- league/event: ^2.2
Requires (Dev)
- phpunit/phpunit: ^5.7.27
- react/socket: ^1.1
Suggests
- ext-swoole: ~4.0 for SwooleClient
- react/socket: To use ReactClient, require react/socket:^1.1.
This package is auto-updated.
Last update: 2024-11-29 06:03:03 UTC
README
Mqtt client in PHP
Installation
composer require drmer/mqtt-client
Usage
use Drmer\Mqtt\Client\SimpleClient; require __DIR__ . '/../vendor/autoload.php'; $client = SimpleClient::v4(); $client->debug = true; $client->connect('127.0.0.1', 1883); $client->publish('hello/world', 'Message from SimpleClient', 1); $client->disconnect(); $client->close();
Warning
This library is still unstable, please DO NOT use this in production.