sendHttpResponse(ctx, req, new DefaultHttpResponse(HTTP_1_1, FORBIDDEN));
return;
}
// Handshake
WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(
this.getWebSocketLocation(req), null, false);
this.handshaker = wsFactory.newHandshaker(req);
if (this.handshaker == null) {
wsFactory.sendUnsupportedWebSocketVersionResponse(ctx.getChannel());
} else {
ChannelFuture handshake = this.handshaker.handshake(ctx.getChannel(), req);
if (handshake.isSuccess()) {
// we need to insert an encoder that takes the underlying ChannelBuffer of a StompFrame.toHornetQBuffer and
// wrap it in a binary web socket frame before letting the wsencoder send it on the wire