up. 优化代码内容
This commit is contained in:
parent
9ae18c1bd3
commit
6f292b84e4
@ -14,12 +14,25 @@ use app\service\GatewayClientService;
|
|||||||
use think\db\exception\DataNotFoundException;
|
use think\db\exception\DataNotFoundException;
|
||||||
use think\db\exception\DbException;
|
use think\db\exception\DbException;
|
||||||
use think\db\exception\ModelNotFoundException;
|
use think\db\exception\ModelNotFoundException;
|
||||||
|
use think\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网关事件订阅类
|
* 网关事件订阅类
|
||||||
*/
|
*/
|
||||||
class GatewaySubscribe
|
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客户端登录
|
* Ws客户端登录
|
||||||
* @param PutMessage $put
|
* @param PutMessage $put
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user