| 62 | } |
| 63 | |
| 64 | static void socket_close(int fd) |
| 65 | { |
| 66 | if(fd <= 0) { |
| 67 | return; |
| 68 | } |
| 69 | |
| 70 | ::shutdown(fd, SHUT_RDWR); |
| 71 | #ifdef __WIN32 |
| 72 | ::closesocket(fd); |
| 73 | #else |
| 74 | ::close(fd); |
| 75 | #endif |
| 76 | } |
| 77 | |
| 78 | static bool socket_blocking(int fd, bool block) |
| 79 | { |
no test coverage detected