| 1 |
#ifndef UNIX_H |
| 2 |
#define UNIX_H |
| 3 |
/*=========================================================================*\ |
| 4 |
* Unix domain object |
| 5 |
* LuaSocket toolkit |
| 6 |
* |
| 7 |
* This module is just an example of how to extend LuaSocket with a new |
| 8 |
* domain. |
| 9 |
\*=========================================================================*/ |
| 10 |
#include "lua.h" |
| 11 |
|
| 12 |
#include "buffer.h" |
| 13 |
#include "timeout.h" |
| 14 |
#include "socket.h" |
| 15 |
#include "luasocket.h" |
| 16 |
|
| 17 |
#ifndef UNIX_API |
| 18 |
#define UNIX_API extern |
| 19 |
#endif |
| 20 |
|
| 21 |
typedef struct t_unix_ { |
| 22 |
t_socket sock; |
| 23 |
t_io io; |
| 24 |
t_buffer buf; |
| 25 |
t_timeout tm; |
| 26 |
} t_unix; |
| 27 |
typedef t_unix *p_unix; |
| 28 |
|
| 29 |
UNIX_API int luaopen_socket_unix(lua_State *L); |
| 30 |
|
| 31 |
#endif /* UNIX_H */ |