diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
commit | 0f6c8d50a99997ac7829864b1c93362b50f1bbf3 (patch) | |
tree | d0cefe3a05484e65b7b7e79d8cae4a1d2e6d19fb /src/udp.h | |
parent | c1ef3e7103cc652d2004ef1ddc9409b946207f33 (diff) | |
download | luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.gz luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.bz2 luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.zip |
Porting to LUA 5.0 final
Diffstat (limited to 'src/udp.h')
-rw-r--r-- | src/udp.h | 27 |
1 files changed, 8 insertions, 19 deletions
@@ -1,30 +1,19 @@ | |||
1 | /*=========================================================================*\ | 1 | #ifndef UDP_H |
2 | * UDP class: inherits from Socked and Internet domain classes and provides | 2 | #define UDP_H |
3 | * all the functionality for UDP objects. | ||
4 | * | ||
5 | * RCS ID: $Id$ | ||
6 | \*=========================================================================*/ | ||
7 | #ifndef UDP_H_ | ||
8 | #define UDP_H_ | ||
9 | 3 | ||
10 | #include "lsinet.h" | 4 | #include <lua.h> |
11 | 5 | ||
12 | #define UDP_CLASS "luasocket(UDP socket)" | 6 | #include "tm.h" |
7 | #include "sock.h" | ||
13 | 8 | ||
14 | #define UDP_DATAGRAMSIZE 576 | 9 | #define UDP_DATAGRAMSIZE 576 |
15 | 10 | ||
16 | #define UDP_FIELDS \ | 11 | typedef struct t_udp_ { |
17 | INET_FIELDS; \ | 12 | t_sock sock; |
18 | int udp_connected | 13 | t_tm tm; |
19 | |||
20 | typedef struct t_udp_tag { | ||
21 | UDP_FIELDS; | ||
22 | } t_udp; | 14 | } t_udp; |
23 | typedef t_udp *p_udp; | 15 | typedef t_udp *p_udp; |
24 | 16 | ||
25 | void udp_inherit(lua_State *L, cchar *lsclass); | ||
26 | void udp_construct(lua_State *L, p_udp udp); | ||
27 | void udp_open(lua_State *L); | 17 | void udp_open(lua_State *L); |
28 | p_udp udp_push(lua_State *L); | ||
29 | 18 | ||
30 | #endif | 19 | #endif |