| 123 | } |
| 124 | |
| 125 | static bool socket_would_block(void) { |
| 126 | #ifdef _WIN32 |
| 127 | int error = WSAGetLastError(); |
| 128 | return error == WSAEWOULDBLOCK || error == WSAEINTR; |
| 129 | #else |
| 130 | return errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR; |
| 131 | #endif |
| 132 | } |
| 133 | |
| 134 | static bool socket_set_nonblocking(cbm_sock_t fd) { |
| 135 | #ifdef _WIN32 |
no outgoing calls
no test coverage detected