<?php
namespace app\crm\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use Workerman\Worker;
use Workerman\Lib\Timer;

class Workerman extends Command
{
    protected function configure()
    {
        $this->setName('server')->setDescription('Suxuan system service');
    }
    
    protected function execute(Input $input, Output $output)
    {
        vendor('workerman.Autoloader');
        global $argv;
        $argv[1] = 'start';
        $argv[0] = 'abcde';
        $worker = new Worker();
        $worker->onWorkerStart = function($worker) {

        };
        Worker::runAll();
        die;
    }

}