Trying to get connect-with-timeout to work. Darwin works...

This commit is contained in:
Diego Nehab
2004-01-18 00:04:20 +00:00
parent 02ef4e7daa
commit c8d58798f0
14 changed files with 232 additions and 198 deletions

View File

@ -18,17 +18,21 @@
\*=========================================================================*/
#include <lua.h>
#include "socket.h"
#include "timeout.h"
#ifdef WIN32
#define INET_ATON
#endif
void inet_open(lua_State *L);
const char *inet_tryconnect(p_sock ps, const char *address,
unsigned short port, int timeout);
const char *inet_tryconnect(p_sock ps, p_tm tm, const char *address,
unsigned short port);
const char *inet_trybind(p_sock ps, const char *address,
unsigned short port, int backlog);
const char *inet_trycreate(p_sock ps, int type);
const char *inet_tryaccept(p_sock ps, p_tm tm, p_sock pc);
int inet_meth_getpeername(lua_State *L, p_sock ps);
int inet_meth_getsockname(lua_State *L, p_sock ps);