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

Function opt_get_error

engine/script/src/luasocket/options.c:344–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344int opt_get_error(lua_State *L, p_socket ps)
345{
346 int val = 0;
347 socklen_t len = sizeof(val);
348 if (getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *) &val, &len) < 0) {
349 lua_pushnil(L);
350 lua_pushliteral(L, "getsockopt failed");
351 return 2;
352 }
353 lua_pushstring(L, socket_strerror(val));
354 return 1;
355}
356
357static int opt_setboolean(lua_State *L, p_socket ps, int level, int name)
358{

Callers

nothing calls this directly

Calls 3

lua_pushnilFunction · 0.85
lua_pushstringFunction · 0.85
socket_strerrorFunction · 0.70

Tested by

no test coverage detected