List of usage examples for io.netty.handler.codec.http HttpContent retain
@Override
HttpContent retain(int increment);
From source file:io.urmia.proxy.HttpProxyFrontendHandler.java
License:Open Source License
@Override protected void channelRead0(ChannelHandlerContext ctx, HttpObject msg) throws Exception { //log.info("frontend channelRead0: {}", msg); if (!(msg instanceof HttpContent)) { log.warn("not supposed to receive msg of type: " + msg); return;/*from www . ja v a2 s. c o m*/ } HttpContent content = (HttpContent) msg; digestUpdate(content); content.retain(outboundCount); // will be write by outboundCount writeToAllOutbounds(ctx, content); }