MCPcopy Create free account
hub / github.com/Tencent/UnLua / meth_close

Function meth_close

Plugins/UnLuaExtensions/LuaSocket/Source/src/unixstream.cpp:279–285  ·  view source on GitHub ↗

-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

277* Closes socket used by object
278\*-------------------------------------------------------------------------*/
279static int meth_close(lua_State *L)
280{
281 p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1);
282 socket_destroy(&un->sock);
283 lua_pushnumber(L, 1);
284 return 1;
285}
286
287/*-------------------------------------------------------------------------*\
288* Puts the sockt in listen mode

Callers

nothing calls this directly

Calls 3

auxiliar_checkgroupFunction · 0.85
lua_pushnumberFunction · 0.85
socket_destroyFunction · 0.70

Tested by

no test coverage detected