Given a nonblocking TCP socket, if the call
read(sock, buf, bufLen)
returns a value < bufLen
, is it safe to then wait for an edge-triggered EPOLLIN event? Or must I call read
again to ensure it's zero or EAGAIN?
In my testing, everything stays working when I remove the last call, I just want to know if it's guaranteed anywhere, or by the Linux source code, and if I can get rid of the extra call.