public function createServer(LoopInterface $loop) { $this->listener = new SocketListener($this->endpoint, $loop); $this->server = new NetworkServer($this->listener); return $this->server; }