您能否解释一下与引导程序一起使用的 sendBufferSize receiveBufferSize 选项背后的想法:
bootstrap.setOption("sendBufferSize", 1048576);
bootstrap.setOption("receiveBufferSize", 1048576);
我注意到在客户端之间传输大容量数据时,它们可以提高以下代码的性能:
// encode method in OneToOneEncoder subclass -> 1st client
ChannelBuffer buffer = ChannelBuffers.buffer(capacity);
buffer.writeInt(myData);
// decode method in FrameDecoder subclass -> 2nd client
int myData = buffer.readInt();
谢谢!