// +---------------------------------------------------------------------- namespace think\swoole; use think\swoole\concerns\InteractsWithCoordinator; use think\swoole\concerns\InteractsWithHttp; use think\swoole\concerns\InteractsWithPools; use think\swoole\concerns\InteractsWithQueue; use think\swoole\concerns\InteractsWithRpcServer; use think\swoole\concerns\InteractsWithRpcClient; use think\swoole\concerns\InteractsWithServer; use think\swoole\concerns\InteractsWithSwooleTable; use think\swoole\concerns\InteractsWithWebsocket; use think\swoole\concerns\WithApplication; use think\swoole\concerns\WithContainer; /** * Class Manager */ class Manager { use InteractsWithCoordinator, InteractsWithServer, InteractsWithSwooleTable, InteractsWithHttp, InteractsWithWebsocket, InteractsWithPools, InteractsWithRpcClient, InteractsWithRpcServer, InteractsWithQueue, WithContainer, WithApplication; /** * Server events. * * @var array */ protected $events = [ 'start', 'shutDown', 'workerStart', 'workerStop', 'workerError', 'workerExit', 'packet', 'task', 'finish', 'pipeMessage', 'managerStart', 'managerStop', 'request', ]; /** * Initialize. */ protected function initialize(): void { $this->prepareTables(); $this->preparePools(); $this->prepareWebsocket(); $this->setSwooleServerListeners(); $this->prepareRpcServer(); $this->prepareQueue(); $this->prepareRpcClient(); } }