public function restart()
    {
        $httpServer = $this->getHttpServer();

        // 是否已启动
        if ($httpServer->isRunning()) {
            $this->stop();
        }

        // 重启默认是守护进程
        $httpServer->setDaemonize();
        $this->start();
    }
public function restart()
    {
        $httpServer = $this->getHttpServer();

        // 是否已启动
        if ($httpServer->isRunning()) {
            $this->stop();
        }

        // 重启默认是守护进程
        $httpServer->setDaemonize();
        $this->start();
    }
public function restart ( ) { $ httpServer = $ this -> getHttpServer ( ) ; // 是否已启动 if ( $ httpServer -> isRunning ( ) ) { $ this -> stop ( ) ; } // 重启默认是守护进程 $ httpServer -> setDaemonize ( ) ; $ this -> start ( ) ; }
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
Restart the http server