Five Pitfalls of Linux Sockets Programming (developerWorks)
Posted Sep 21, 2005 12:20 UTC (Wed) by RobSeace
Parent article: Five Pitfalls of Linux Sockets Programming (developerWorks)
> Three classes of return values are possible from the send API function:
> * If the data has been successfully queued for transmission, a zero is returned.
Um, no... This is completely wrong... send()/write() will always return
the number of bytes queued for transmission, except in the case of errors
(including transient 'soft'-errors, like EINTR, EAGAIN, etc.) where it
returns -1... It should never return zero, unless maybe you pass in zero
as the length arg...
to post comments)