private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {
        // Check for closing frame
        if (frame instanceof CloseWebSocketFrame) {
            handshaker.close(ctx.channel(), (CloseWebSocketFrame) frame.retain());
            //Room.leaveRoom(ctx);
            return;
        }
        if (frame instanceof PingWebSocketFrame) {
            ctx.channel().write(new PongWebSocketFrame(frame.content().retain()));
            return;
        }
        if (!(frame instanceof TextWebSocketFrame)) {
            throw new UnsupportedOperationException(String.format("%s frame types not supported", frame.getClass()
                    .getName()));
        }
        if ((frame instanceof TextWebSocketFrame)) {
        	String text = ((TextWebSocketFrame)frame).text();
        	System.out.println(text);
        	ctx.channel().writeAndFlush(new TextWebSocketFrame("WebSocket服务端返回信息 "+ new Date()));
        }

    }