// socket and resend the request. We try a number of times
// before finally abandoning:
if (items[0].isReadable()) {
// We got a reply from the server, must match sequence
String reply = client.recvStr();
if (reply == null)
break; // Interrupted
if (Integer.parseInt(reply) == sequence) {
System.out.printf("I: server replied OK (%s)\n", reply);
retriesLeft = REQUEST_RETRIES;