aboutsummaryrefslogtreecommitdiff
path: root/src/udp.h
diff options
context:
space:
mode:
authorCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
committerCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
commit5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch)
treea9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /src/udp.h
parentccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff)
parent43a97b7f0053313b43906371dbdc226271e6c8ab (diff)
downloadluasocket-hjelmeland-patch-1.tar.gz
luasocket-hjelmeland-patch-1.tar.bz2
luasocket-hjelmeland-patch-1.zip
Merge branch 'master' into hjelmeland-patch-1hjelmeland-patch-1
Diffstat (limited to '')
-rw-r--r--src/udp.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/udp.h b/src/udp.h
index 2b831a5..07d5247 100644
--- a/src/udp.h
+++ b/src/udp.h
@@ -8,16 +8,15 @@
8* (AF_INET, SOCK_DGRAM). 8* (AF_INET, SOCK_DGRAM).
9* 9*
10* Two classes are defined: connected and unconnected. UDP objects are 10* Two classes are defined: connected and unconnected. UDP objects are
11* originally unconnected. They can be "connected" to a given address 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 12* with a call to the setpeername function. The same function can be used to
13* break the connection. 13* break the connection.
14\*=========================================================================*/ 14\*=========================================================================*/
15#include "lua.h" 15#include "luasocket.h"
16 16
17#include "timeout.h" 17#include "timeout.h"
18#include "socket.h" 18#include "socket.h"
19 19
20/* can't be larger than wsocket.c MAXCHUNK!!! */
21#define UDP_DATAGRAMSIZE 8192 20#define UDP_DATAGRAMSIZE 8192
22 21
23typedef struct t_udp_ { 22typedef struct t_udp_ {
@@ -27,6 +26,14 @@ typedef struct t_udp_ {
27} t_udp; 26} t_udp;
28typedef t_udp *p_udp; 27typedef t_udp *p_udp;
29 28
29#ifndef _WIN32
30#pragma GCC visibility push(hidden)
31#endif
32
30int udp_open(lua_State *L); 33int udp_open(lua_State *L);
31 34
35#ifndef _WIN32
36#pragma GCC visibility pop
37#endif
38
32#endif /* UDP_H */ 39#endif /* UDP_H */