Laravel 中使用 Workerman插件 进行 socket 通讯的功能

#安装方式
步骤一、安装插件

composer require workerman/gateway-worker

步骤二、安装完毕后在‘app\Console\Commands’创建文件’WorkermanCommand.php’

argument('action');

        $argv[0] = 'wk';
        $argv[1] = $action;
        $argv[2] = $this->option('d') ? '-d' : '';

        $this->start();
    }

    private function start()
    {
        $this->startGateWay();
        $this->startBusinessWorker();
        $this->startRegister();
        Worker::runAll();
    }

    private function startBusinessWorker()
    {
        $wor

你可能感兴趣的:(PHP)