public function restart()
    {
        $server = $this->createServerManager();

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

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

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

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