| 106 | } |
| 107 | |
| 108 | int translate_windows_error(int wsa_error) FL_NOEXCEPT { |
| 109 | switch (wsa_error) { |
| 110 | case WSAEWOULDBLOCK: return EWOULDBLOCK; |
| 111 | case WSAECONNREFUSED: return ECONNREFUSED; |
| 112 | case WSAETIMEDOUT: return ETIMEDOUT; |
| 113 | case WSAENETUNREACH: return ENETUNREACH; |
| 114 | case WSAEACCES: return EACCES; |
| 115 | case WSAEADDRINUSE: return EADDRINUSE; |
| 116 | case WSAEINVAL: return EINVAL; |
| 117 | case WSAENOTCONN: return ENOTCONN; |
| 118 | case WSAECONNRESET: return ECONNRESET; |
| 119 | case WSAECONNABORTED: return ECONNABORTED; |
| 120 | default: return wsa_error; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | //============================================================================= |
| 125 | // Normalized POSIX-Style Socket API Functions |