* Check whether this error describes that the operation would block. * @return True iff the operation would block. */
| 38 | * @return True iff the operation would block. |
| 39 | */ |
| 40 | bool NetworkError::WouldBlock() const |
| 41 | { |
| 42 | #if defined(_WIN32) |
| 43 | return this->error == WSAEWOULDBLOCK; |
| 44 | #else |
| 45 | /* Usually EWOULDBLOCK and EAGAIN are the same, but sometimes they are not |
| 46 | * and the POSIX.1 specification states that either should be checked. */ |
| 47 | return this->error == EWOULDBLOCK || this->error == EAGAIN; |
| 48 | #endif |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Check whether this error describes a connection reset. |
no outgoing calls
no test coverage detected