handleUpgrade(uri, connection, callback);
}
private void handleUpgrade(final URI uri, final HttpClientConnection connection, final HttpClientCallback<WebSocketChannel> callback) {
try {
ConnectedStreamChannel channel = connection.performUpgrade();
callback.completed(new WebSocket13Channel(channel, connection.getBufferPool(), uri.toString(), Collections.<String>emptySet(), true, false));
} catch (IOException e) {
callback.failed(e);
}