| 12345678910111213141516171819202122232425262728293031323334 | <?phpdeclare (strict_types = 1);namespace app\command;use think\console\Command;use think\console\Input;use think\console\input\Argument;use think\console\input\Option;use think\console\Output;class WebSocketClient extends Base{    protected function configure()    {        // 指令配置        $this->setName('webSocketClient')            ->setDescription('the webSocketClient command');    }    protected function main()    {        parent::main(); // TODO: Change the autogenerated stub        $this->writeln("webSocketServer","info");        $work=new \app\common\workman\WebSocketClient();        $work->start();        /*while (true){        }*/        $this->writeln("end","info");        //启动websocket服务    }}
 |