no data to read from the socket and there is no error. For this case, if FIONREAD tells us that there are 0 bytes to read, check if there is a socket error and return ok/error based on that. Some eventsystems may cause this to burn some cpu if the socket is ok but there are no bytes available to read by invoking POLLIN over and over, but it is better than failing the application.
13 KiB
13 KiB