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服务 } }