diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2012-05-10 14:14:22 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2012-05-10 14:14:22 -0700 |
commit | 156669c28bc62bfddbd5625c4bb4c1f8da94802b (patch) | |
tree | 074ea57dd044a9bed306464af8c9f141bdf0ca19 /src/inet.h | |
parent | 3d3e69c6e43f6431969e072e78df43b0ab73c48d (diff) | |
download | luasocket-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -33,6 +33,9 @@ const char *inet_trybind(p_socket ps, const char *address, const char *serv, | |||
33 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); | 33 | int inet_meth_getpeername(lua_State *L, p_socket ps, int family); |
34 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); | 34 | int inet_meth_getsockname(lua_State *L, p_socket ps, int family); |
35 | 35 | ||
36 | int inet_optfamily(lua_State* L, int narg, const char* def); | ||
37 | int inet_optsocktype(lua_State* L, int narg, const char* def); | ||
38 | |||
36 | #ifdef INET_ATON | 39 | #ifdef INET_ATON |
37 | int inet_aton(const char *cp, struct in_addr *inp); | 40 | int inet_aton(const char *cp, struct in_addr *inp); |
38 | #endif | 41 | #endif |