public function createServer(NetworkComponentInterface $component, LoopInterface $loop) { $this->listener = new SocketListener($this->endpoint, $loop); $this->server = new SocketServer($this->listener); $this->http = new HttpServer($this->server, $component); return $this->http; }