[sctp-dev] Socket Options Issue

Alan Bateman Alan.Bateman at Sun.COM
Thu Jan 14 08:06:24 PST 2010


Christopher Hegarty - Sun Microsystems Ireland wrote:
> :
>
> I sent a mail to lksctp-developers [1], and they essentially said that 
> the given value is doubled to provide a rough (very rough) estimate of 
> the Socket Kernel Buffer overhead in the kernel per frame.
>
> I'm not sure if we want to do anything at the java level to at least 
> make these values match. As Alan said, the value set is only a hint to 
> the OS so I don't think we should have functional tests that are 
> relying on this. Actually, looking at the socket option tests we have 
> in the test directory of OpenJDK the value set for these options is 
> never directly compared to the value retrieved.
>
> -Chris.
It's the similar with TCP and UDP sockets which is why methods such as 
Socket.getSendBufferSize  or SocketChannel.getOption(SO_SNDBUF) return 
the result / 2. That is, the returned result is meant to be close to 
what should be available as the send (or receive) buffer. You could do 
something similar in the SCTP code.

-Alan.


More information about the sctp-dev mailing list