Socket buffer usage
nec556 at retena.com
Sun Apr 8 13:08:51 UTC 2012
At 23:16 07/04/2012, you wrote:
>I'm tracking down an obscure bug in my userland program and it might
>have something to do with the way I write&read data through a (Unix
>domain) socket. I'm setting SO_SNDBUF and SO_RCVBUF, and what I'm
>looking for is some way to query the amount of TX & RX buffered / free
>data on a socket. Is there something I can use? I'll even accept
>inspecting kernel structures if explained in detail and can be done on
>a running system.
>Alternatively, is there anything else which could cause poll(2) with
>POLLOUT on a socket to return no events ready on such a socket? (my
>expectation being that a socket is always ready to be written to if
>there is buffer space free...).
Setting fd to -1 in pollfd struct resets revents. Perhaps you have
not setted fd properly.
>freebsd-hackers at freebsd.org mailing list
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers