beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luasocket / src / udp.h
blob2b831a5371613bf6d41b7cc5ff8b77e82b6c63ed
1 #ifndef UDP_H
2 #define UDP_H
3 /*=========================================================================*\
4 * UDP object
5 * LuaSocket toolkit
7 * The udp.h module provides LuaSocket with support for UDP protocol
8 * (AF_INET, SOCK_DGRAM).
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 "lua.h"
17 #include "timeout.h"
18 #include "socket.h"
20 /* can't be larger than wsocket.c MAXCHUNK!!! */
21 #define UDP_DATAGRAMSIZE 8192
23 typedef struct t_udp_ {
24 t_socket sock;
25 t_timeout tm;
26 int family;
27 } t_udp;
28 typedef t_udp *p_udp;
30 int udp_open(lua_State *L);
32 #endif /* UDP_H */