Package er.woadaptor.websockets

Examples of er.woadaptor.websockets.WebSocket


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


        wsFactory.sendUnsupportedWebSocketVersionResponse(socketChannel);
      } else {
        ChannelFuture future = handshaker.handshake(socketChannel, req);
        //TODO tie this to the channel future result?
        //Create a WebSocket instance to handle frames
        WebSocket socket = factory.create(socketChannel, req);
        WebSocketStore.defaultWebSocketStore().takeSocketForChannel(socket, socketChannel);
       
        socket.didUpgrade();
      }
    }
View Full Code Here

TOP

Related Classes of er.woadaptor.websockets.WebSocket

Copyright © 2018 www.massapicom. 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.