suppose I want to use netty 4.X to transfer big java object (with many container). I want to use a ByteBuf as buffer during encoder in order to optimize performance and minimize memory usage, so I have two questions before I proceed.
1- I want to use MessageToByteEncoder to complete this job, is it suitable?
2- Can we writeAndFlush ByteBuf to ChannelHandlerContext when ever buffer's capacity is reached inside encod(ChannelHandlerContext, Object, ByteBuf)?