tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: readv() on TCP socket returns 0



On Thu, Mar 07, 2013 at 12:58:50PM -0500, Mouse wrote:
> 
> If you care about portability, I would recommend not counting on this.
> For example, it wouldn't surprise me if some other OSes returned zero
> for a nonblocking read with no data immediately available.  (I don't
> know of any specific examples.)

That would be a bug -- how would you detect connection close in that
case?  Clearly such a read must return EWOULDBLOCK.

Thor


Home | Main Index | Thread Index | Old Index