mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
added more timeout related constants to the 'net' module
This commit is contained in:
parent
f17b2a3bb2
commit
447c98a233
@ -200,6 +200,8 @@ const LUA_REG_TYPE net_map[] =
|
||||
{ LSTRKEY( "ERR_ABORTED" ), LNUMVAL( ELUA_NET_ERR_ABORTED ) },
|
||||
{ LSTRKEY( "ERR_OVERFLOW" ), LNUMVAL( ELUA_NET_ERR_OVERFLOW ) },
|
||||
{ LSTRKEY( "SYS_TIMER" ), LNUMVAL( PLATFORM_TIMER_SYS_ID ) },
|
||||
{ LSTRKEY( "NO_TIMEOUT" ), LNUMVAL( 0 ) },
|
||||
{ LSTRKEY( "INF_TIMEOUT" ), LNUMVAL( PLATFORM_TIMER_INF_TIMEOUT ) },
|
||||
#endif
|
||||
{ LNILKEY, LNILVAL }
|
||||
};
|
||||
@ -220,6 +222,8 @@ LUALIB_API int luaopen_net( lua_State *L )
|
||||
MOD_REG_NUMBER( L, "ERR_ABORTED", ELUA_NET_ERR_ABORTED );
|
||||
MOD_REG_NUMBER( L, "ERR_OVERFLOW", ELUA_NET_ERR_OVERFLOW );
|
||||
MOD_REG_NUMBER( L, "SYS_TIMER", PLATFORM_TIMER_SYS_ID );
|
||||
MOD_REG_NUMBER( L, "NO_TIMEOUT", 0 );
|
||||
MOD_REG_NUMBER( L, "INF_TIMEOUT", PLATFORM_TIMER_INF_TIMEOUT );
|
||||
|
||||
return 1;
|
||||
#endif // #if LUA_OPTIMIZE_MEMORY > 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user