This commit is contained in:
freek 2018-11-24 01:35:08 +01:00
parent b42d6d3975
commit 6a45296154
1 changed files with 2 additions and 7 deletions

View File

@ -44,20 +44,15 @@ class StartWebSocketServer extends Command
protected function startWebSocketServer()
{
$this->info("Starting the WebSocket server on port {$this->option('port')}...");
$routes = WebSocketRouter::getRoutes();
$loop = LoopFactory::create();
$loop->futureTick(function () {
$this->info("Started the WebSocket server on port {$this->option('port')}");
});
/** 🎩 Start the magic 🎩 */
return (new WebSocketServer($routes))
->setHost($this->option('host'))
->setPort($this->option('port'))
->setConsoleOutput($this->output)
->setLoop($loop)
->run();
}
}