diff options
author | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
---|---|---|
committer | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
commit | 5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch) | |
tree | a9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /src/inet.h | |
parent | ccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff) | |
parent | 43a97b7f0053313b43906371dbdc226271e6c8ab (diff) | |
download | luasocket-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 'src/inet.h')
-rw-r--r-- | src/inet.h | 26 |
1 files changed, 16 insertions, 10 deletions
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | * The Lua functions toip and tohostname are also implemented here. | 15 | * The Lua functions toip and tohostname are also implemented here. |
16 | \*=========================================================================*/ | 16 | \*=========================================================================*/ |
17 | #include "lua.h" | 17 | #include "luasocket.h" |
18 | #include "socket.h" | 18 | #include "socket.h" |
19 | #include "timeout.h" | 19 | #include "timeout.h" |
20 | 20 | ||
@@ -22,21 +22,23 @@ | |||
22 | #define LUASOCKET_INET_ATON | 22 | #define LUASOCKET_INET_ATON |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifndef _WIN32 | ||
26 | #pragma GCC visibility push(hidden) | ||
27 | #endif | ||
28 | |||
25 | int inet_open(lua_State *L); | 29 | int inet_open(lua_State *L); |
26 | 30 | ||
27 | const char *inet_trycreate(p_socket ps, int family, int type, int protocol); | 31 | int inet_optfamily(lua_State* L, int narg, const char* def); |
28 | const char *inet_tryconnect(p_socket ps, int *family, const char *address, | 32 | int inet_optsocktype(lua_State* L, int narg, const char* def); |
29 | const char *serv, p_timeout tm, struct addrinfo *connecthints); | ||
30 | const char *inet_trybind(p_socket ps, int *family, const char *address, | ||
31 | const char *serv, struct addrinfo *bindhints); | ||
32 | const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); | ||
33 | const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); | ||
34 | 33 | ||
35 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); | 34 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); |
36 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); | 35 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); |
37 | 36 | ||
38 | int inet_optfamily(lua_State* L, int narg, const char* def); | 37 | const char *inet_trycreate(p_socket ps, int family, int type, int protocol); |
39 | int inet_optsocktype(lua_State* L, int narg, const char* def); | 38 | const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); |
39 | const char *inet_tryconnect(p_socket ps, int *family, const char *address, const char *serv, p_timeout tm, struct addrinfo *connecthints); | ||
40 | const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); | ||
41 | const char *inet_trybind(p_socket ps, int *family, const char *address, const char *serv, struct addrinfo *bindhints); | ||
40 | 42 | ||
41 | #ifdef LUASOCKET_INET_ATON | 43 | #ifdef LUASOCKET_INET_ATON |
42 | int inet_aton(const char *cp, struct in_addr *inp); | 44 | int inet_aton(const char *cp, struct in_addr *inp); |
@@ -47,4 +49,8 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); | |||
47 | int inet_pton(int af, const char *src, void *dst); | 49 | int inet_pton(int af, const char *src, void *dst); |
48 | #endif | 50 | #endif |
49 | 51 | ||
52 | #ifndef _WIN32 | ||
53 | #pragma GCC visibility pop | ||
54 | #endif | ||
55 | |||
50 | #endif /* INET_H */ | 56 | #endif /* INET_H */ |