if (response.getType().equals(IQ.Type.ERROR)) {
throw new XMPPException("Remote client returned error, stream hosts expected",
response.getError());
}
StreamHostUsed used = response.getUsedHost();
StreamHost usedHost = query.getStreamHost(used.getJID());
if (usedHost == null) {
throw new XMPPException("Remote user responded with unknown host");
}
// The local computer is acting as the proxy
if (used.getJID().equals(query.getFrom())) {
info.establishedSocket = proxy.getSocket(digest);
info.selectedHost = usedHost;
return info;
}
else {