Closed twim32 closed 9 months ago
Execute the command and paste the result below.
Command: php -v && php --ri swoole
php -v && php --ri swoole
PHP 8.3.1 (cli) (built: Dec 21 2023 20:12:13) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.1, Copyright (c) Zend Technologies with Zend OPcache v8.3.1, Copyright (c), by Zend Technologies Extension 'swoole' not present.
$config = new Simps\MQTT\Config\ClientConfig([ 'userName' => $username, 'password' => $pwd, 'clientId' => 'iakov', 'keepAlive' => 10, 'protocolName' => 'MQTT', // or MQIsdp 'protocolLevel' => 5, // or 3, 5 'properties' => [], // optional in MQTT5 'delay' => 3000, // 3s 'maxAttempts' => 5, 'swooleConfig' => [] ]); $client = new \Simps\MQTT\Client($server, $port, $config, \Simps\MQTT\Client::COROUTINE_CLIENT_TYPE); $client->connect();
# Paste your code here.
You can also provide tcpdump's packet capture logs, Use a command like this: tcpdump -i en0 port 1883 -w mqtt.pcap, Please give me the mqtt.pcap file. Also remember to change to your network card and port.
tcpdump -i en0 port 1883 -w mqtt.pcap
mqtt.pcap
用 client 需要安装 swoole 扩展。
Execute the command and paste the result below.
Command:
php -v && php --ri swoole
Description:
Reproducible codes: