Esempio n. 1
0
 @Override
 public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
   Http.Inbound inbound = channels.get(ctx);
   if (inbound != null) {
     inbound.close();
   }
   channels.remove(ctx);
 }
Esempio n. 2
0
 private void websocketFrameReceived(
     final ChannelHandlerContext ctx, WebSocketFrame webSocketFrame) {
   Http.Inbound inbound = channels.get(ctx);
   if (webSocketFrame.isBinary()) {
     inbound._received(new Http.WebSocketFrame(webSocketFrame.getBinaryData().array()));
   } else {
     inbound._received(new Http.WebSocketFrame(webSocketFrame.getTextData()));
   }
 }