| 132 | } |
| 133 | |
| 134 | static bool socket_set_nonblocking(cbm_sock_t fd) { |
| 135 | #ifdef _WIN32 |
| 136 | u_long enabled = 1; |
| 137 | return ioctlsocket(fd, FIONBIO, &enabled) == 0; |
| 138 | #else |
| 139 | int flags = fcntl(fd, F_GETFL, 0); |
| 140 | return flags >= 0 && fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0; |
| 141 | #endif |
| 142 | } |
| 143 | |
| 144 | static void socket_shutdown(cbm_sock_t fd) { |
| 145 | #ifdef _WIN32 |
no outgoing calls
no test coverage detected