Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Apr 2012 15:10:17 +0200
From:      Eduardo Morras <nec556@retena.com>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Socket buffer usage
Message-ID:  <4EFDA3B5017E0D89@> (added by postmaster@resmaa12.ono.com)
In-Reply-To: <CAF-QHFWV%2ByV3VwY3dhhxzi4=xwrJcUDULW=PyJxQH8Vb=61%2BSw@mail.g mail.com>
References:  <CAF-QHFWV%2ByV3VwY3dhhxzi4=xwrJcUDULW=PyJxQH8Vb=61%2BSw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 23:16 07/04/2012, you wrote:
>Hi,
>
>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@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EFDA3B5017E0D89>