aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2002-07-03 19:06:54 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2002-07-03 19:06:54 +0000
commit88026bef8a5ca586e354965a79134646fb566c72 (patch)
tree7594d9748c9dfd5db4addc0756b0cf86a0d9206a /src/inet.h
parent9b8bce6465d2c7de84782f9e12f529a020a16444 (diff)
downloadluasocket-88026bef8a5ca586e354965a79134646fb566c72.tar.gz
luasocket-88026bef8a5ca586e354965a79134646fb566c72.tar.bz2
luasocket-88026bef8a5ca586e354965a79134646fb566c72.zip
Initial revision
Diffstat (limited to 'src/inet.h')
-rw-r--r--src/inet.h36
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\*-------------------------------------------------------------------------*/
22typedef t_sock t_inet;
23typedef t_inet *p_inet;
24
25/*-------------------------------------------------------------------------*\
26* Exported functions
27\*-------------------------------------------------------------------------*/
28void inet_open(lua_State *L);
29void inet_construct(lua_State *L, p_inet inet);
30void inet_inherit(lua_State *L, cchar *lsclass);
31
32cchar *inet_tryconnect(p_sock sock, cchar *address, ushort);
33cchar *inet_trybind(p_sock sock, cchar *address, ushort);
34cchar *inet_trysocket(p_inet inet, int type);
35
36#endif /* INET_H_ */