MCPcopy Create free account
hub / github.com/davisking/dlib / close_socket

Function close_socket

dlib/sockets/sockets_kernel_2.cpp:56–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54// ----------------------------------------------------------------------------------------
55
56 static void
57 close_socket (
58 int sock
59 )
60 /*!
61 requires
62 - sock == a socket
63 ensures
64 - sock has been closed
65 !*/
66 {
67 while (true)
68 {
69 int status = ::close(sock);
70 if (status == -1 && errno == EINTR)
71 continue;
72 break;
73 }
74 }
75
76// ----------------------------------------------------------------------------------------
77

Callers 6

~connectionMethod · 0.85
create_listening_socketFunction · 0.85
create_listenerFunction · 0.85
create_connectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected