this.httpClient = httpClient;
}
@Override
public void connect(Address address, final ReadyConnection connection) {
HttpRequest request = new HttpRequest(address, false, HttpRequest.Method.GET, "/");
request.getHeaders().put("Sec-WebSocket-Key", BaseEncoding.base64().encode(String.valueOf(random.nextLong()).getBytes(Charsets.UTF_8)));
request.getHeaders().put("Sec-WebSocket-Version", "13");
request.getHeaders().put("Connection", "Upgrade");
request.getHeaders().put("Upgrade", "websocket");
httpClient.send(request, 0, new HttpClientHandler() {
private WebsocketFrameReader websocketFrameReader;
@Override
public void failed(IOException e) {