aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2003-05-25 01:54:13 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2003-05-25 01:54:13 +0000
commit0f6c8d50a99997ac7829864b1c93362b50f1bbf3 (patch)
treed0cefe3a05484e65b7b7e79d8cae4a1d2e6d19fb /src/inet.h
parentc1ef3e7103cc652d2004ef1ddc9409b946207f33 (diff)
downloadluasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.gz
luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.bz2
luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.zip
Porting to LUA 5.0 final
Diffstat (limited to 'src/inet.h')
-rw-r--r--src/inet.h36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/inet.h b/src/inet.h
index 93fcedf..bcefc5b 100644
--- a/src/inet.h
+++ b/src/inet.h
@@ -1,38 +1,26 @@
1/*=========================================================================*\ 1/*=========================================================================*\
2* Internet domain class: inherits from the Socket class, and implement 2* Internet domain functions
3* a few methods shared by all internet related objects
4* 3*
5* RCS ID: $Id$ 4* RCS ID: $Id$
6\*=========================================================================*/ 5\*=========================================================================*/
7#ifndef INET_H_ 6#ifndef INET_H
8#define INET_H_ 7#define INET_H
9 8
10#include <lua.h> 9#include <lua.h>
11#include "lssock.h" 10#include "sock.h"
12
13/* class name */
14#define INET_CLASS "luasocket(inet)"
15
16/*-------------------------------------------------------------------------*\
17* Socket fields
18\*-------------------------------------------------------------------------*/
19#define INET_FIELDS SOCK_FIELDS
20
21/*-------------------------------------------------------------------------*\
22* Socket structure
23\*-------------------------------------------------------------------------*/
24typedef t_sock t_inet;
25typedef t_inet *p_inet;
26 11
27/*-------------------------------------------------------------------------*\ 12/*-------------------------------------------------------------------------*\
28* Exported functions 13* Exported functions
29\*-------------------------------------------------------------------------*/ 14\*-------------------------------------------------------------------------*/
30void inet_open(lua_State *L); 15void inet_open(lua_State *L);
31void inet_construct(lua_State *L, p_inet inet);
32void inet_inherit(lua_State *L, cchar *lsclass);
33 16
34cchar *inet_tryconnect(p_sock sock, cchar *address, ushort); 17const char *inet_tryconnect(p_sock ps, const char *address,
35cchar *inet_trybind(p_sock sock, cchar *address, ushort); 18 unsigned short port);
36cchar *inet_trysocket(p_inet inet, int type); 19const char *inet_trybind(p_sock ps, const char *address,
20 unsigned short port, int backlog);
21const char *inet_trycreate(p_sock ps, int type);
22
23int inet_meth_getpeername(lua_State *L, p_sock ps);
24int inet_meth_getsockname(lua_State *L, p_sock ps);
37 25
38#endif /* INET_H_ */ 26#endif /* INET_H_ */