aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
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_ */