private static void pongUsingAsynchronousClient(String hostname) throws Exception {
InetSocketAddress address = new InetSocketAddress(hostname, 12345);
while (true) {
Long t = System.nanoTime();
AsyncClient client = pongClientPool.borrowClient(address);
System.out.println("Getting client took " + ((System.nanoTime() - t) / (1000 * 1000)) +
"ms");
client.ping("PING", new Callback(address, System.nanoTime()));
Thread.sleep(30);
}
}