On 3/4/06, Christian Biesinger <[EMAIL PROTECTED]> wrote:
> Jon Smirl wrote:
> > I was basing the code on this. With a zero for EOF you can't tell
> > whether their isn't data available or if the socket is closed. Zero at
> > EOF is fine, but it needs to return NS_BASE_STREAM_CLOSED for the
> > result value.
>
> Hmm. The comments don't match the code.
>
> >      * Determine number of bytes available in the stream.  A non-blocking
> >      * stream that does not yet have any data to read should return 0 bytes
> >      * from this method (i.e., it must not throw the 
> > NS_BASE_STREAM_WOULD_BLOCK
> >      * exception).
>
> This disagrees with:
> http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/base/src/nsSocketTransport2.cpp&rev=1.41&mark=285,304#270
>
> :-/
>
> darin, is the code or the documentation wrong here?

The code is wrong IMO.  If you recall, I went over most of the
Available implementations recently and tried to make them match the
documentation.  I guess I missed this one.

-Darin
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to