Forwarded to the correct ML.

Please be careful when replying...

On Thu, 24 Jun 2010 13:55:57 +0200, Emmanuel Lecharny
<[email protected]>
wrote:
 I
 set the buffer size to 1, so that the data transfer from client to
server
 should be horrible slow. But it isn't. So the change I made on buffer
 size
 is not passed to the socket, but only to the session config object.


 I have done the very same test, and I guarantee you that the buffer size

 is set to 1. Here is the modified code that demonstrates the set value :


Ah, now I see. The classes are more nested than I thought. Thanks for the
stacktrace. That brought up some light ;-)

So to get it clear: If I now wish to change the buffer's size, I have to
do it on server side BEFORE i call "bind()" on the acceptor, correct?
If it's afterwards not possible to change the buffer size, should't there
be at least a note in the javadoc, or the better an exception? Because if
the value is stored in the session config and not forwarded to the socket,
one can later not query for the real buffer setting on the socket, or?

beside that:

ServerSocket.serReceiveBufferSize() javadoc says:

"It is possible to change the value subsequently, by calling
Socket.setReceiveBufferSize(int)."

So in general it's possible with java to change the buffer size while the
socket already is connected.



- Alex


Reply via email to