Hi all,

I am trying to change the send buffer size through setsockopt and it
doesn't seem to be working. The server socket is in the framework
layer and the client socket writes data from the linux user space.

My understanding is that if an attempt is made to write, say 1000
bytes when the buffer size is 100, the socket write call would block
(blocking mode of operation used) until bytes are read from the server
side.

I try and set a buffer size for the SND_BUF of the client socket and
it doesn't return any error. However, the client continues to write as
many bytes as it would write without the flow control code (below) in
place.
###
if (setsockopt(clientSocketHandle, SOL_SOCKET, SO_SNDBUF,
&sndBuffSize, sizeof(sndBuffSize)) < 0)
{
  //error message logged
}
###

I have tried with values starting from 0 to multiples of 1024 bytes.
Seems to have not effect whatsoever. Any help in understanding this
better would be highly appreciated.

Regards,
Santosh

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to