MCPcopy Create free account
hub / github.com/SmingHub/Sming / socket_close

Function socket_close

Sming/Arch/Host/Components/hostlib/sockets.cpp:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64static 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
78static bool socket_blocking(int fd, bool block)
79{

Callers 2

closeMethod · 0.85
try_connectMethod · 0.85

Calls 1

shutdownFunction · 0.85

Tested by

no test coverage detected