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

Function inet_optfamily

Plugins/UnLuaExtensions/LuaSocket/Source/src/inet.cpp:144–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144int inet_optfamily(lua_State* L, int narg, const char* def)
145{
146 static const char* optname[] = { "unspec", "inet", "inet6", NULL };
147 static int optvalue[] = { AF_UNSPEC, AF_INET, AF_INET6, 0 };
148
149 return optvalue[luaL_checkoption(L, narg, def, optname)];
150}
151
152int inet_optsocktype(lua_State* L, int narg, const char* def)
153{

Callers 1

global_connectFunction · 0.85

Calls 1

luaL_checkoptionFunction · 0.85

Tested by

no test coverage detected