if (request.hasBody()) {
CompleteListener cl = new CompleteListener(exchange, webSocketHandler);
request.getNonBlockingBody().addCompleteListener(cl);
request.getNonBlockingBody().addDestroyListener(cl);
} else {
new WebSocketConnection((HttpServerConnection) exchange.getConnection(), webSocketHandler, exchange);
}
return true;
} else {
return false;
}