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

Function opt_get_linger

Plugins/UnLuaExtensions/LuaSocket/Source/src/options.cpp:255–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255int opt_get_linger(lua_State *L, p_socket ps)
256{
257 struct linger li; /* obj, name */
258 int len = sizeof(li);
259 int err = opt_get(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, &len);
260 if (err)
261 return err;
262 lua_newtable(L);
263 lua_pushboolean(L, li.l_onoff);
264 lua_setfield(L, -2, "on");
265 lua_pushinteger(L, li.l_linger);
266 lua_setfield(L, -2, "timeout");
267 return 1;
268}
269
270/*------------------------------------------------------*/
271int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps)

Callers

nothing calls this directly

Calls 4

opt_getFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_setfieldFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected