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

Function meth_close

Plugins/UnLuaExtensions/LuaSocket/Source/src/serial.cpp:121–127  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

119* Closes socket used by object
120\*-------------------------------------------------------------------------*/
121static int meth_close(lua_State *L)
122{
123 p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
124 socket_destroy(&un->sock);
125 lua_pushnumber(L, 1);
126 return 1;
127}
128
129
130/*-------------------------------------------------------------------------*\

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