MCPcopy Create free account
hub / github.com/defold/defold / meth_close

Function meth_close

engine/script/src/luasocket/serial.c:136–142  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

134* Closes socket used by object
135\*-------------------------------------------------------------------------*/
136static int meth_close(lua_State *L)
137{
138 p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
139 socket_destroy(&un->sock);
140 lua_pushnumber(L, 1);
141 return 1;
142}
143
144
145/*-------------------------------------------------------------------------*\

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