Neeraj Gupta
Neeraj Gupta

Reputation: 173

Netty ChannelRead method is not getting invoked

Hi In my netty sample if I configure my ServerBootstrap with AUTO_READ option as false. Then in my corresponding handler ChannelRead method is never getting invoked, only ChannelActive is getting invoked. However if I remove the AUTO_READ option then everything is working and both the methods are getting invoked.

Am I missing something very basic here?

Upvotes: 1

Views: 1271

Answers (1)

Frederic Brégier
Frederic Brégier

Reputation: 2206

When AUTO_READ is set to false, no read operation occurs until you explicitely call channel.read();

When you set it to true, then read are automatically allowed and passed up to the handlers.

See here

Upvotes: 3

Related Questions