| 253 | } |
| 254 | |
| 255 | int 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 | /*------------------------------------------------------*/ |
| 271 | int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps) |
nothing calls this directly
no test coverage detected