protected function initializeServer(LoopInterface $loop, $port)
    {
        $writer = new Stream("php://output");
        $logger = new Logger();
        $logger->addWriter($writer);

        return new WebSocketServer("tcp://0.0.0.0:{$port}", $loop, $logger);
    }
protected function initializeServer(LoopInterface $loop, $port)
    {
        $writer = new Stream("php://output");
        $logger = new Logger();
        $logger->addWriter($writer);

        return new WebSocketServer("tcp://0.0.0.0:{$port}", $loop, $logger);
    }
protected function initializeServer ( LoopInterface $ loop , $ port ) { $ writer = new Stream ( "php://output" ) ; $ logger = new Logger ( ) ; $ logger -> addWriter ( $ writer ) ; return new WebSocketServer ( "tcp://0.0.0.0:{$port}" , $ loop , $ logger ) ; }
Initializes web-socket server

@param LoopInterface $loop
@param int           $port

@return WebSocketServer
Initializes web - socket server