Blame src/udp.h

Packit b53373
#ifndef UDP_H
Packit b53373
#define UDP_H
Packit b53373
/*=========================================================================*\
Packit b53373
* UDP object
Packit b53373
* LuaSocket toolkit
Packit b53373
*
Packit b53373
* The udp.h module provides LuaSocket with support for UDP protocol
Packit b53373
* (AF_INET, SOCK_DGRAM).
Packit b53373
*
Packit b53373
* Two classes are defined: connected and unconnected. UDP objects are
Packit b53373
* originally unconnected. They can be "connected" to a given address 
Packit b53373
* with a call to the setpeername function. The same function can be used to
Packit b53373
* break the connection.
Packit b53373
\*=========================================================================*/
Packit b53373
#include "lua.h"
Packit b53373
Packit b53373
#include "timeout.h"
Packit b53373
#include "socket.h"
Packit b53373
Packit b53373
/* can't be larger than wsocket.c MAXCHUNK!!! */
Packit b53373
#define UDP_DATAGRAMSIZE 8192
Packit b53373
Packit b53373
typedef struct t_udp_ {
Packit b53373
    t_socket sock;
Packit b53373
    t_timeout tm;
Packit b53373
    int family;
Packit b53373
} t_udp;
Packit b53373
typedef t_udp *p_udp;
Packit b53373
Packit b53373
int udp_open(lua_State *L);
Packit b53373
Packit b53373
#endif /* UDP_H */