From 6f292b84e4d862f5d388137cc2ffd4d112da484e Mon Sep 17 00:00:00 2001 From: v Date: Fri, 29 Aug 2025 22:19:48 +0800 Subject: [PATCH] =?UTF-8?q?up.=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/subscribe/GatewaySubscribe.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/subscribe/GatewaySubscribe.php b/app/subscribe/GatewaySubscribe.php index c6028ae..5f33456 100644 --- a/app/subscribe/GatewaySubscribe.php +++ b/app/subscribe/GatewaySubscribe.php @@ -14,12 +14,25 @@ use app\service\GatewayClientService; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; +use think\Event; /** * 网关事件订阅类 */ class GatewaySubscribe { + /** + * 统一订阅监听注册 + * @param Event $event + * @return void + */ + public function subscribe(Event $event): void + { + $event->listen('clientLogin', [$this,'onClientLogin']); + $event->listen('lockClient',[$this,'onLockClient']); + $event->listen('clientClose',[$this,'onClientClose']); + } + /** * Ws客户端登录 * @param PutMessage $put