| 326 | |
| 327 | |
| 328 | inline void tcp_set_nonblocking(SOCKET_T& sockfd) |
| 329 | { |
| 330 | #ifdef NON_BLOCKING |
| 331 | #ifdef _WIN32 |
| 332 | unsigned long blocking = 1; |
| 333 | int ret = ioctlsocket(sockfd, FIONBIO, &blocking); |
| 334 | #else |
| 335 | int flags = fcntl(sockfd, F_GETFL, 0); |
| 336 | int ret = fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); |
| 337 | #endif |
| 338 | #endif |
| 339 | } |
| 340 | |
| 341 | |
| 342 | inline void tcp_socket(SOCKET_T& sockfd, SOCKADDR_IN_T& addr) |
no outgoing calls
no test coverage detected