RE: socket: setting SO_SNDBUF

From: David Schwartz (davids@webmaster.com)
Date: Thu May 11 2000 - 03:34:31 EST


> Putting it another way, if getsockopt(SNDBUF) tells me 4096, I'm
> thinking to
> myself that 4096 octets will be buffered, when in fact it will
> only be 2048.
> Or am I missing something?
>
> --Mike

        Yes. What you are missing is that Linux does not just store data in those
buffers, so there is no simple correlation between the size of the buffers
and the number of bytes they can hold. Returning half the buffer size would
give you an even more meaningless number than you currently get. At least
now, you actually do get the number of bytes reserved for something.

        DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:17 EST