The general use of Netty to send and receive data will inherit Simplechannelinboundhandler and Channelinboundhandleradapter these two abstract classes, then what is the difference between the two?
In fact, with these two abstract classes are fastidious, in the client's business handler inheritance is Simplechannelinboundhandler, and on the server side inherited is Channelinboundhandleradapter.
The main difference is that Simplechannelinboundhandler automatically release the Bytebuffer resource (called Bytebuffer.release ()) that is consumed by the data after it receives the data. And why the server is not available, because we want the server to send the data requested by the client back, and the server side may not have finished writing the data before the Channelread method returns, so it cannot be automatically release.
Simplechannelinboundhandler and Channelinboundhandleradapter differences