Subject: Re: FIONWRITE proposal
To: None <wrstuden@netbsd.org>
From: None <cgd@broadcom.com>
List: tech-kern
Date: 10/13/2004 17:56:09
At Wed, 13 Oct 2004 23:12:58 +0000 (UTC), "Bill Studenmund" wrote:
> This ioctl is like FIONREAD, except instead of looking at the read queue, 
> it looks at how many bytes are in the write queue.
> 
> The semantic for the value is that it returns the number of bytes written 
> to the file descriptor that have not been "sent". If someone can come up 
> with a better description, I'm all ears. :-)
>
> I want this call because I have an application which needs to do
> scheduling flow control in userland. I can't just depend on a non-blocking
> socket as the protocol I'm using deals with requests (protocol blocks or
> PDUs, etc.). So once you start sending a request, you have to finish it.

Why is "number of bytes which have not yet been 'sent'" the right
semantics, as opposed to, say, "number of bytes that you can
immediately write"?

The latter would definitely more akin to the write side of FIONREAD,
as far as I know...

(I'm thinking that the notion of "have not been 'sent'" is very, very
nebulous, and, at least from your description isn't the information
that you actually want, anyway!)


cgd