aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2012-05-10 14:14:22 -0700
committerSam Roberts <vieuxtech@gmail.com>2012-05-10 14:14:22 -0700
commit156669c28bc62bfddbd5625c4bb4c1f8da94802b (patch)
tree074ea57dd044a9bed306464af8c9f141bdf0ca19 /src/inet.h
parent3d3e69c6e43f6431969e072e78df43b0ab73c48d (diff)
downloadluasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.tar.gz
luasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.tar.bz2
luasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.zip
socket.connect now implemented in the C core
This avoid socket.lua duplicating the iteration over the results of getaddrinfo(). Some problems with the C implementation not initializing sockets or the luasocket family have also been fixed, and error reporting made more robust.
Diffstat (limited to 'src/inet.h')
-rw-r--r--src/inet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inet.h b/src/inet.h
index 1cbe4f4..05633bb 100644
--- a/src/inet.h
+++ b/src/inet.h
@@ -33,6 +33,9 @@ const char *inet_trybind(p_socket ps, const char *address, const char *serv,
33int inet_meth_getpeername(lua_State *L, p_socket ps, int family); 33int inet_meth_getpeername(lua_State *L, p_socket ps, int family);
34int inet_meth_getsockname(lua_State *L, p_socket ps, int family); 34int inet_meth_getsockname(lua_State *L, p_socket ps, int family);
35 35
36int inet_optfamily(lua_State* L, int narg, const char* def);
37int inet_optsocktype(lua_State* L, int narg, const char* def);
38
36#ifdef INET_ATON 39#ifdef INET_ATON
37int inet_aton(const char *cp, struct in_addr *inp); 40int inet_aton(const char *cp, struct in_addr *inp);
38#endif 41#endif