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

Function meth_close

Plugins/UnLuaExtensions/LuaSocket/Source/src/tcp.cpp:292–298  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

290* Closes socket used by object
291\*-------------------------------------------------------------------------*/
292static int meth_close(lua_State *L)
293{
294 p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
295 socket_destroy(&tcp->sock);
296 lua_pushnumber(L, 1);
297 return 1;
298}
299
300/*-------------------------------------------------------------------------*\
301* Returns family as string

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