This commit is contained in:
shengchanzhe 2023-12-20 19:20:05 +08:00
parent de27bbac4c
commit 13ae20fbb6

View File

@ -13,9 +13,9 @@ class Publish
public function onConnect(TcpConnection $connection) public function onConnect(TcpConnection $connection)
{ {
$mqtt = new \Workerman\Mqtt\Client('mqtt://ceshi-mqtt.lihaink.cn:1883', array( $mqtt = new \Workerman\Mqtt\Client('mqtt://mqtt.lihaink.cn:1883', array(
"username" => "demo2", "username" => "lihai_lot_land_1",
"password" => "123456", "password" => "lihai_lot_land_1",
"client_id" => "admin_123", "client_id" => "admin_123",
)); ));
$mqtt->connect(); $mqtt->connect();