Below is a ChannelHandler
for a echo server.
Netty framework will call channelReadComplete()
method to notify the handler that the last call made to channelRead()
was the last message in the current batch.
My question is, since data are transferred on wire in trunks, how could Netty know when a batch of message
is complete?
channelReadComplete() is triggered once there is no more data to read from the underlying transport. When talking about SocketChannels this would be either of these two cases:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.