bootstrap.connect(
new InetSocketAddress(uri.getHost(), uri.getPort()));
future.awaitUninterruptibly().rethrowIfFailed();
ch = future.getChannel();
handshaker.handshake(ch).awaitUninterruptibly().rethrowIfFailed();
// Send 10 messages and wait for responses
System.out.println("WebSocket Client sending message");
for (int i = 0; i < 10; i++) {
ch.write(new TextWebSocketFrame("Message #" + i));