Socket InputStream.available may return a positive value after shutdown

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 13 10:39:34 PDT 2011


Jing LV wrote:
> Hello,
>
>     Alan (or anyone else), do we have time to discuss these postponed 
> defects? Or do you have a outlook for this?
>     Thank you.
Sorry for the late reply, I've been on vacation.

I think now is a good time to discuss this one. As I mentioned in the 
initial discussion, the existing behavior is platform specific. Once 
shutdown for input, then the ioctl(FIONREAD) or equivalent will continue 
to return the number of bytes in the socket buffer, other platforms will 
return 0. Changing the implementation is trivial and the question is 
whether this is the right thing to do. We will also need to clarify the 
specification. Chris, Michael - do you have opinions on this one?

-Alan.



More information about the net-dev mailing list