@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { Http.Inbound inbound = channels.get(ctx); if (inbound != null) { inbound.close(); } channels.remove(ctx); }
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())); } }