original_string: public function restart()
      {
          $httpServer = $this->getHttpServer();
  
          // 是否已启动
          if ($httpServer->isRunning()) {
              $this->stop();
          }
  
          // 重启默认是守护进程
          $httpServer->setDaemonize();
          $this->start();
      }
code: public function restart()
      {
          $httpServer = $this->getHttpServer();
  
          // 是否已启动
          if ($httpServer->isRunning()) {
              $this->stop();
          }
  
          // 重启默认是守护进程
          $httpServer->setDaemonize();
          $this->start();
      }
code_tokens: public function restart ( ) { $ httpServer = $ this -> getHttpServer ( ) ; // 是否已启动 if ( $ httpServer -> isRunning ( ) ) { $ this -> stop ( ) ; } // 重启默认是守护进程 $ httpServer -> setDaemonize ( ) ; $ this -> start ( ) ; }
docstring: Restart the http server
  
  @Usage {fullCommand} [-d|--daemon]
  @Options
  -d, --daemon    Run server on the background
  @Example
  {fullCommand}
  {fullCommand} -d
  @throws \Swoft\Exception\RuntimeException
  @throws \InvalidArgumentException
  @throws \RuntimeException
docstring_tokens: Restart the http server