| 92 | }; |
| 93 | |
| 94 | bool close_socket(dpp::socket sfd) |
| 95 | { |
| 96 | /* close_socket on an error socket is a non-op */ |
| 97 | if (sfd != INVALID_SOCKET) { |
| 98 | shutdown(sfd, 2); |
| 99 | #ifdef _WIN32 |
| 100 | return closesocket(sfd) == 0; |
| 101 | #else |
| 102 | return ::close(sfd) == 0; |
| 103 | #endif |
| 104 | } |
| 105 | return false; |
| 106 | } |
| 107 | |
| 108 | std::string get_socket_error() { |
| 109 | #ifdef _WIN32 |
no outgoing calls
no test coverage detected