You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package provides an asynchronous MQTT client built on the [React socket client](https://github.com/reactphp/socket-client). All client methods return a promise which is fulfilled if the operation succeeded or rejected if the operation failed. Incoming messages of subscribed topics are delivered via the "message" event.
8
-
7
+
This package provides an asynchronous MQTT client built on the [React socket](https://github.com/reactphp/socket) library. All client methods return a promise which is fulfilled if the operation succeeded or rejected if the operation failed. Incoming messages of subscribed topics are delivered via the "message" event.
8
+
9
9
## Install
10
10
11
11
Via composer:
@@ -27,14 +27,14 @@ use BinSoul\Net\Mqtt\DefaultMessage;
27
27
use BinSoul\Net\Mqtt\DefaultSubscription;
28
28
use BinSoul\Net\Mqtt\Message;
29
29
use BinSoul\Net\Mqtt\Subscription;
30
-
use React\SocketClient\DnsConnector;
31
-
use React\SocketClient\TcpConnector;
30
+
use React\Socket\DnsConnector;
31
+
use React\Socket\TcpConnector;
32
32
33
33
include 'vendor/autoload.php';
34
34
35
35
// Setup client
36
-
$loop = React\EventLoop\Factory::create();
37
-
$dnsResolverFactory = new React\Dns\Resolver\Factory();
36
+
$loop = \React\EventLoop\Factory::create();
37
+
$dnsResolverFactory = new \React\Dns\Resolver\Factory();
38
38
$connector = new DnsConnector(new TcpConnector($loop), $dnsResolverFactory->createCached('8.8.8.8', $loop));
0 commit comments