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);
}
}