1

Could you explain me the idea behind sendBufferSize receiveBufferSize options that are used together with bootstrap:

bootstrap.setOption("sendBufferSize", 1048576); 
bootstrap.setOption("receiveBufferSize", 1048576);

I noticed they can improve performance of the following code when big-size data is transferred between clients:

// 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();

Thanks!

peter
  • 631
  • 2
  • 7
  • 18

1 Answers1

2

These options specify the buffer sizes on the Channel's underlying Java Socket instances. There is a good summary of what those mean in What are SO_SNDBUF and SO_RECVBUF.

Community
  • 1
  • 1
Nicholas
  • 15,916
  • 4
  • 42
  • 66