Examples of PongWebSocketFrame


Examples of org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame

         this.handshaker.close(ctx.getChannel(), (CloseWebSocketFrame)frame);
         return false;
      }
      else if (frame instanceof PingWebSocketFrame)
      {
         ctx.getChannel().write(new PongWebSocketFrame(frame.getBinaryData()));
         return false;
      }
      else if (!(frame instanceof TextWebSocketFrame))
      {
         throw new UnsupportedOperationException(String.format("%s frame types not supported", frame.getClass()
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame

        // Check for closing frame
        if (frame instanceof CloseWebSocketFrame) {
            this.handshaker.close(ctx.getChannel(), (CloseWebSocketFrame) frame);
            return false;
        } else if (frame instanceof PingWebSocketFrame) {
            ctx.getChannel().write(new PongWebSocketFrame(frame.getBinaryData()));
            return false;
        } else if (!(frame instanceof TextWebSocketFrame)) {
            throw new UnsupportedOperationException(String.format("%s frame types not supported", frame.getClass()
                    .getName()));
        }
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame

      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);
      }
    }
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame

   }

   private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {
      if (frame instanceof PingWebSocketFrame) {
         // received a ping, so write back a pong
         ctx.getChannel().write(new PongWebSocketFrame(frame.getBinaryData()));
      } else if (frame instanceof CloseWebSocketFrame) {
         // request to close the connection
         handshaker.close(ctx.getChannel(), (CloseWebSocketFrame) frame);
      } else {
         try {
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame

        // Check for closing frame
        if (frame instanceof CloseWebSocketFrame) {
            this.handshaker.close(ctx.getChannel(), (CloseWebSocketFrame) frame);
            return;
        } else if (frame instanceof PingWebSocketFrame) {
            ctx.getChannel().write(new PongWebSocketFrame(frame.getBinaryData()));
            return;
        } else if (!(frame instanceof TextWebSocketFrame)) {
            throw new UnsupportedOperationException(String.format("%s frame types not supported", frame.getClass()
                    .getName()));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.