Skip to content

Commit 60922be

Browse files
committed
Update printf
1 parent 8c3561c commit 60922be

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/server.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Simps\MQTT\Protocol;
1515
use Simps\MQTT\Types;
16+
use Simps\MQTT\Tools\Common;
1617

1718
$server = new Swoole\Server('127.0.0.1', 1883, SWOOLE_BASE);
1819

@@ -30,7 +31,7 @@
3031

3132
$server->on('receive', function (Swoole\Server $server, $fd, $from_id, $data) {
3233
try {
33-
Protocol::printf($data);
34+
Common::printf($data);
3435
$data = Protocol::unpack($data);
3536
var_dump($data);
3637
if (is_array($data) && isset($data['type'])) {

examples/v5/server.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Simps\MQTT\ProtocolV5;
1515
use Simps\MQTT\Types;
16+
use Simps\MQTT\Tools\Common;
1617

1718
$server = new Swoole\Server('127.0.0.1', 1883, SWOOLE_BASE);
1819

@@ -30,7 +31,7 @@
3031

3132
$server->on('receive', function (Swoole\Server $server, $fd, $from_id, $data) {
3233
try {
33-
ProtocolV5::printf($data);
34+
Common::printf($data);
3435
$data = ProtocolV5::unpack($data);
3536
if (is_array($data) && isset($data['type'])) {
3637
switch ($data['type']) {

0 commit comments

Comments
 (0)