When calling setsockopt with SO_RECVBUF, then turning around and calling getsockopt with SO_RECVBUF, it appears to be telling me that it sets the buffer size to twice what I requested it to be set to. Anybody know why that may be?
code in question:
https://gist.github.com/rdp/8443238
output:
setting it as 2222
[udp @ 0x1a72ec0] end receive buffer size reported is 4444
Only in linux, on other OS's seem to report it as the value I set it to. Thank you.
Excerpt from Linux man page for socket
So, kernel doubles the value you set for it's internal purpose.