try {
socket = new Socket(adr[i], desc.getPort());
break;
} catch (IOException e) {
if (i == adr.length - 1) {
throw new NoConnectException(e.toString());
}
}
}
XConnection con;
try {
if (desc.getTcpNoDelay() != null) {
socket.setTcpNoDelay(desc.getTcpNoDelay().booleanValue());
}
con = new SocketConnection(connectionDescription, socket);
} catch (IOException e) {
throw new NoConnectException(e.toString());
}
connected = true;
return con;
}