protected function getRemote(ConnectionInterface $connection)
    {
        $hostname = $connection->getServerHostname();
        $port = $connection->getServerPort();

        $deferred = new Deferred();
        $this->resolveHostname($hostname)
            ->then(
                function($ip) use($deferred, $port) {
                    $deferred->resolve('tcp://' . $ip . ':' . $port);
                },
                function($error) use ($deferred) {
                    $deferred->reject($error);
                }
            );

        return $deferred->promise();
    }