Open aikonchem opened 1 year ago
Describe the bug 在http控制器调用 /* @var \Swoole\WebSocket\Server $server / $server->push(1, 'hello, welcome! :)'); 提示Undefined variable $server bean配置文件 'wsServer' => [ 'class' => WebSocketServer::class, 'port' => 18308, 'listener' => [ //'rpc' => bean('rpcServer'), 'tcp' => bean('tcpServer'), ], 'on' => [ // Enable http handle SwooleEvent::REQUEST => bean(RequestListener::class), // Enable task must add task and finish event SwooleEvent::TASK => bean(TaskListener::class), SwooleEvent::FINISH => bean(FinishListener::class) ], //'debug' => 1, 'debug' => env('SWOFT_DEBUG', 0), / @see WebSocketServer::$setting / 'setting' => [ 'task_worker_num' => 6, 'task_enable_coroutine' => true, 'worker_num' => 6, 'log_file' => alias('@runtime/swoole.log'), // 'open_websocket_close_frame' => true, ],
Describe the bug 在http控制器调用 /* @var \Swoole\WebSocket\Server $server / $server->push(1, 'hello, welcome! :)'); 提示Undefined variable $server bean配置文件 'wsServer' => [ 'class' => WebSocketServer::class, 'port' => 18308, 'listener' => [ //'rpc' => bean('rpcServer'), 'tcp' => bean('tcpServer'), ], 'on' => [ // Enable http handle SwooleEvent::REQUEST => bean(RequestListener::class), // Enable task must add task and finish event SwooleEvent::TASK => bean(TaskListener::class), SwooleEvent::FINISH => bean(FinishListener::class) ], //'debug' => 1, 'debug' => env('SWOFT_DEBUG', 0), / @see WebSocketServer::$setting / 'setting' => [ 'task_worker_num' => 6, 'task_enable_coroutine' => true, 'worker_num' => 6, 'log_file' => alias('@runtime/swoole.log'), // 'open_websocket_close_frame' => true, ],