MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / close_socket

Function close_socket

src/dpp/sslconnection.cpp:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92};
93
94bool 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
108std::string get_socket_error() {
109#ifdef _WIN32

Callers 5

mainFunction · 0.85
one_second_timerMethod · 0.85
read_loopMethod · 0.85
closeMethod · 0.85
~raii_socketMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected