diff options
Diffstat (limited to 'vendor/luasocket/src/udp.h')
-rw-r--r-- | vendor/luasocket/src/udp.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vendor/luasocket/src/udp.h b/vendor/luasocket/src/udp.h new file mode 100644 index 00000000..07d5247f --- /dev/null +++ b/vendor/luasocket/src/udp.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef UDP_H | ||
2 | #define UDP_H | ||
3 | /*=========================================================================*\ | ||
4 | * UDP object | ||
5 | * LuaSocket toolkit | ||
6 | * | ||
7 | * The udp.h module provides LuaSocket with support for UDP protocol | ||
8 | * (AF_INET, SOCK_DGRAM). | ||
9 | * | ||
10 | * Two classes are defined: connected and unconnected. UDP objects are | ||
11 | * originally unconnected. They can be "connected" to a given address | ||
12 | * with a call to the setpeername function. The same function can be used to | ||
13 | * break the connection. | ||
14 | \*=========================================================================*/ | ||
15 | #include "luasocket.h" | ||
16 | |||
17 | #include "timeout.h" | ||
18 | #include "socket.h" | ||
19 | |||
20 | #define UDP_DATAGRAMSIZE 8192 | ||
21 | |||
22 | typedef struct t_udp_ { | ||
23 | t_socket sock; | ||
24 | t_timeout tm; | ||
25 | int family; | ||
26 | } t_udp; | ||
27 | typedef t_udp *p_udp; | ||
28 | |||
29 | #ifndef _WIN32 | ||
30 | #pragma GCC visibility push(hidden) | ||
31 | #endif | ||
32 | |||
33 | int udp_open(lua_State *L); | ||
34 | |||
35 | #ifndef _WIN32 | ||
36 | #pragma GCC visibility pop | ||
37 | #endif | ||
38 | |||
39 | #endif /* UDP_H */ | ||