Example usage for io.netty.channel ChannelConfig isAutoRead

List of usage examples for io.netty.channel ChannelConfig isAutoRead

Introduction

In this page you can find the example usage for io.netty.channel ChannelConfig isAutoRead.

Prototype

boolean isAutoRead();

Source Link

Document

Returns true if and only if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all.

Usage

From source file:org.jooby.internal.netty.NettyWebSocket.java

License:Apache License

@Override
public void resume() {
    ChannelConfig config = ctx.channel().config();
    if (!config.isAutoRead()) {
        config.setAutoRead(true);/*w ww .j av  a  2  s. c o  m*/
    }
}

From source file:org.jooby.internal.netty.NettyWebSocket.java

License:Apache License

@Override
public void pause() {
    ChannelConfig config = ctx.channel().config();
    if (config.isAutoRead()) {
        config.setAutoRead(false);/*  www. j  av  a 2 s. co m*/
    }
}