Use this function for BSD socket compatibility However, don't use it blindly as we return code ETIMEDOUT is "lost". The background is that ETIMEDOUT is returned rather than EWOULDBLOCK on windows on socket timeout.
| 184 | // The background is that ETIMEDOUT is returned rather than EWOULDBLOCK on windows |
| 185 | // on socket timeout. |
| 186 | static Result NativeToResultCompat(int r) |
| 187 | { |
| 188 | Result res = NativeToResult(__FILE__, __LINE__, r); |
| 189 | if (res == RESULT_TIMEDOUT) |
| 190 | { |
| 191 | res = RESULT_WOULDBLOCK; |
| 192 | } |
| 193 | return res; |
| 194 | } |
| 195 | |
| 196 | bool IsSocketIPv4(Socket socket) |
| 197 | { |
no test coverage detected