Example usage for io.netty.handler.codec.http HttpContent retain

List of usage examples for io.netty.handler.codec.http HttpContent retain

Introduction

In this page you can find the example usage for io.netty.handler.codec.http HttpContent retain.

Prototype

@Override
    HttpContent retain(int increment);

Source Link

Usage

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);

}