Re: Socket buffer usage

2012-04-08 Thread Yoshihiro Ota
On Sun, 8 Apr 2012 01:01:01 +0200 Ivan Voras wrote: > On 7 April 2012 23:36, Vlad Galu wrote: > > This might not exactly be what you want, but struct kevent has a member > > called "data" which, > > for sockets and pipes, returns the number of available bytes to read (or > > write) for EVFILT_

Re: Socket buffer usage

2012-04-08 Thread Ivan Voras
On 8 April 2012 15:41, wrote: > ioctl(FIONREAD) Yes, this is what I was looking for, thanks! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubs

RE: Socket buffer usage

2012-04-08 Thread rozhuk . im
ioctl(FIONREAD) > -Original Message- > From: owner-freebsd-hack...@freebsd.org [mailto:owner-freebsd- > hack...@freebsd.org] On Behalf Of Ivan Voras > Sent: Sunday, April 08, 2012 6:17 AM > To: freebsd-hackers > Subject: Socket buffer usage > > Hi, > > I&

Re: Socket buffer usage

2012-04-08 Thread Eduardo Morras
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 bu

Re: Socket buffer usage

2012-04-07 Thread Ivan Voras
On 7 April 2012 23:36, Vlad Galu wrote: > This might not exactly be what you want, but struct kevent has a member > called "data" which, for sockets and pipes, returns the number of available > bytes to read (or write) for EVFILT_READ (or EVFILT_WRITE) events. > That's a good idea but I'm actua

Re: Socket buffer usage

2012-04-07 Thread Vlad Galu
This might not exactly be what you want, but struct kevent has a member called "data" which, for sockets and pipes, returns the number of available bytes to read (or write) for EVFILT_READ (or EVFILT_READ) events. -- Good, fast and cheap: pick any two. On Saturday, April 7, 2012 at 10:16 PM,

Socket buffer usage

2012-04-07 Thread Ivan Voras
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