MCPcopy Create free account
hub / github.com/apache/thrift / socket_destroy

Function socket_destroy

lib/lua/src/usocket.c:107–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107T_ERRCODE socket_destroy(p_socket sock) {
108 // TODO Figure out if I should be free-ing this
109 if (*sock > 0) {
110 (void)socket_setblocking(sock);
111 close(*sock);
112 *sock = -1;
113 }
114 return SUCCESS;
115}
116
117T_ERRCODE socket_bind(p_socket sock, p_sa addr, int addr_len) {
118 int ret = socket_setblocking(sock);

Callers 1

tcp_destroyFunction · 0.85

Calls 1

socket_setblockingFunction · 0.85

Tested by

no test coverage detected