httpHost = $httpHost; $this->port = $port; $this->socket = new Reactor($address.':'.$port, $loop); $this->routes = new RouteCollection; $urlMatcher = new UrlMatcher($this->routes, new RequestContext); $router = new Router($urlMatcher); $httpServer = new Server($router); $this->_server = new IoServer($httpServer, $this->socket, $loop); } public function close() { $this->socket->close(); } }