We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The onconnect callback did not respond, and the mqtt broker is available
php --ri mosquitto Mosquitto support => enabled Compiled as dynamic module libmosquitto version => 1.5.7 Extension version => 0.4.0
php -v PHP 7.4.19 (cli) (built: May 12 2021 13:21:40) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
$client = new Client(); $client -> onConnect(function($code) use ($client){ if($code === 0) { $mid = $client -> publish('/demo',date('Y-m-d H:i:s'),0); } $client -> loopForever(); }); $client -> onPublish(function($publishId) use ($client){ $client -> disconnect(); }); $client -> connect('127.0.0.1'); for ($i = 0; $i < 100; $i++) { // Loop around to permit the library to do its work $client -> loop(1); } echo "Finished\n";
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The onconnect callback did not respond, and the mqtt broker is available
The text was updated successfully, but these errors were encountered: