handleHTTPRequest(ctx, e, (HttpRequest)msg);
}
}
protected void handleWebSocketFrame(ChannelHandlerContext ctx, MessageEvent e, WebSocketFrame frame) {
WebSocket socket = WebSocketStore.defaultWebSocketStore().socketForChannel(e.getChannel());
if (frame instanceof CloseWebSocketFrame) {
//TODO remove from store?
handshaker.close(ctx.getChannel(), (CloseWebSocketFrame) frame);
} else if (frame instanceof PingWebSocketFrame) {
ctx.getChannel().write(new PongWebSocketFrame(frame.getBinaryData()));
} else if(socket != null) {
socket.receiveFrame(frame);
}
}