luasocket/src/inet.h

31 lines
924 B
C
Raw Normal View History

2002-07-03 21:06:54 +02:00
/*=========================================================================*\
2003-05-25 03:54:13 +02:00
* Internet domain functions
2003-03-28 22:08:50 +01:00
*
2002-07-03 21:06:54 +02:00
* RCS ID: $Id$
\*=========================================================================*/
2003-05-25 03:54:13 +02:00
#ifndef INET_H
#define INET_H
2002-07-03 21:06:54 +02:00
#include <lua.h>
#include "socket.h"
2002-07-03 21:06:54 +02:00
/*-------------------------------------------------------------------------*\
* Exported functions
\*-------------------------------------------------------------------------*/
void inet_open(lua_State *L);
2003-05-25 03:54:13 +02:00
const char *inet_tryconnect(p_sock ps, 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);
int inet_meth_getpeername(lua_State *L, p_sock ps);
int inet_meth_getsockname(lua_State *L, p_sock ps);
2002-07-03 21:06:54 +02:00
#ifdef INET_ATON
int inet_aton(const char *cp, struct in_addr *inp);
#endif
2002-07-03 21:06:54 +02:00
#endif /* INET_H_ */