Socket resource temporarily unavailable, errno code is 11 (eagain)
Previous/next article 10:32:42/personal classification: c
View (2026)/comment (0)/score (0/0) on
LinuxNon-blocking
SocketReceive
DataResource temporarily unavailable often occurs, errno code is 11 (eagain), what does this mean?
This indicates that you have called the blocking operation in non-blocking mode. If the operation is not completed, this error is returned. This error will not damage the synchronization of the socket, the next cycle is followed by Recv. For a non-blocking socket, eagain is not an error. In VxWorks andWindowsThe name of eagain is ewouldblock.
In addition, if eintr is returned, that is, errno is 4, and the error description is interrupted system call, the Operation should continue.
Finally, if the returned value of Recv is 0, it indicates that the connection has been disconnected and our receiving operation should also end.