diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2002-07-03 19:06:54 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2002-07-03 19:06:54 +0000 |
commit | 88026bef8a5ca586e354965a79134646fb566c72 (patch) | |
tree | 7594d9748c9dfd5db4addc0756b0cf86a0d9206a /src/inet.h | |
parent | 9b8bce6465d2c7de84782f9e12f529a020a16444 (diff) | |
download | luasocket-88026bef8a5ca586e354965a79134646fb566c72.tar.gz luasocket-88026bef8a5ca586e354965a79134646fb566c72.tar.bz2 luasocket-88026bef8a5ca586e354965a79134646fb566c72.zip |
Initial revision
Diffstat (limited to 'src/inet.h')
-rw-r--r-- | src/inet.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/inet.h b/src/inet.h new file mode 100644 index 0000000..3b0453e --- /dev/null +++ b/src/inet.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /*=========================================================================*\ | ||
2 | * Internet domain class | ||
3 | * RCS ID: $Id$ | ||
4 | \*=========================================================================*/ | ||
5 | #ifndef INET_H_ | ||
6 | #define INET_H_ | ||
7 | |||
8 | #include <lua.h> | ||
9 | #include "lssock.h" | ||
10 | |||
11 | /* class name */ | ||
12 | #define INET_CLASS "luasocket(inet)" | ||
13 | |||
14 | /*-------------------------------------------------------------------------*\ | ||
15 | * Socket fields | ||
16 | \*-------------------------------------------------------------------------*/ | ||
17 | #define INET_FIELDS SOCK_FIELDS | ||
18 | |||
19 | /*-------------------------------------------------------------------------*\ | ||
20 | * Socket structure | ||
21 | \*-------------------------------------------------------------------------*/ | ||
22 | typedef t_sock t_inet; | ||
23 | typedef t_inet *p_inet; | ||
24 | |||
25 | /*-------------------------------------------------------------------------*\ | ||
26 | * Exported functions | ||
27 | \*-------------------------------------------------------------------------*/ | ||
28 | void inet_open(lua_State *L); | ||
29 | void inet_construct(lua_State *L, p_inet inet); | ||
30 | void inet_inherit(lua_State *L, cchar *lsclass); | ||
31 | |||
32 | cchar *inet_tryconnect(p_sock sock, cchar *address, ushort); | ||
33 | cchar *inet_trybind(p_sock sock, cchar *address, ushort); | ||
34 | cchar *inet_trysocket(p_inet inet, int type); | ||
35 | |||
36 | #endif /* INET_H_ */ | ||