From 92ee37b381790d41fccbe80b78b0a7ee8b64d763 Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Sat, 22 Jan 2022 21:08:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=BC=E5=AE=B9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/TestController.php | 26 -------------------------- app/Controller/WebSocketController.php | 11 +++++------ 2 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 app/Controller/TestController.php diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php deleted file mode 100644 index efe13e0..0000000 --- a/app/Controller/TestController.php +++ /dev/null @@ -1,26 +0,0 @@ -response->json([ - 'code' => 200 - ]); - } -} diff --git a/app/Controller/WebSocketController.php b/app/Controller/WebSocketController.php index cd0b044..22acf94 100644 --- a/app/Controller/WebSocketController.php +++ b/app/Controller/WebSocketController.php @@ -12,10 +12,10 @@ declare(strict_types=1); namespace App\Controller; +use Hyperf\Di\Annotation\Inject; use App\Cache\SocketRoom; use App\Service\Group\GroupMemberService; use App\Service\Message\ReceiveHandleService; -use Hyperf\Di\Annotation\Inject; use App\Constant\TalkEventConstant; use Hyperf\Contract\OnCloseInterface; use Hyperf\Contract\OnMessageInterface; @@ -27,7 +27,6 @@ use Swoole\WebSocket\Server; use App\Service\SocketClientService; use App\Event\TalkEvent; - /** * Class WebSocketController * @@ -36,16 +35,16 @@ use App\Event\TalkEvent; class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface { /** - * @inject + * @Inject * @var SocketClientService */ - private $client; + protected $client; /** - * @inject + * @Inject * @var ReceiveHandleService */ - private $receiveHandle; + protected $receiveHandle; /** * 连接创建成功回调事件