123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- declare (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 WebSocketServer extends Base
- {
- protected function configure()
- {
- // 指令配置
- $this->setName('webSocketServer')
- ->setDescription('the webSocketServer command');
- }
- protected function main()
- {
- parent::main(); // TODO: Change the autogenerated stub
- $this->writeln("webSocketServer","info");
- $work=new \app\common\workman\WebSocketServer();
- $work->start();
- /*while (true){
- }*/
- $this->writeln("end","info");
- //启动websocket服务
- }
- }
|