public function createSocketFactory() : SocketFactory { $factory = new SocketFactory(\sprintf('%s:%s', $this->address, $this->port), $this->protocol); $factory->setPeerName($this->getPeerName()); return $factory; }