aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
diff options
context:
space:
mode:
authorDiego Nehab <diego@impa.br>2012-08-23 19:31:15 -0300
committerDiego Nehab <diego@impa.br>2012-08-23 19:31:15 -0300
commit6368caeb5ab5f628b8021c8ebf4d6df436162aaf (patch)
tree2a2005f2e27ee81e8ced7e4fc84098728e106af0 /src/inet.h
parent03ba06f70c9ad5cdc9b49d816490fc28d6dbbdc5 (diff)
downloadluasocket-6368caeb5ab5f628b8021c8ebf4d6df436162aaf.tar.gz
luasocket-6368caeb5ab5f628b8021c8ebf4d6df436162aaf.tar.bz2
luasocket-6368caeb5ab5f628b8021c8ebf4d6df436162aaf.zip
Fix udp:setpeername("*")
There seems to be a curious difference between MacOS and Linux and I am not sure if this is documented. When you break a "connection" on Mac OS, you only eliminate the peer association, but the local address remains bound. On Linux, breaking a "connection" eliminates the binding to the local address. Have you guys ever come accross this? Another irritating difference is that connect() returns the error EAFNOSUPPORT on Mac OS. I am going to ignore all errors when the reason for calling connect() is simply to break the "connection".
Diffstat (limited to 'src/inet.h')
-rw-r--r--src/inet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/inet.h b/src/inet.h
index 05633bb..2346734 100644
--- a/src/inet.h
+++ b/src/inet.h
@@ -29,6 +29,7 @@ const char *inet_tryconnect(p_socket ps, const char *address,
29 const char *serv, p_timeout tm, struct addrinfo *connecthints); 29 const char *serv, p_timeout tm, struct addrinfo *connecthints);
30const char *inet_trybind(p_socket ps, const char *address, const char *serv, 30const char *inet_trybind(p_socket ps, const char *address, const char *serv,
31 struct addrinfo *bindhints); 31 struct addrinfo *bindhints);
32const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm);
32 33
33int inet_meth_getpeername(lua_State *L, p_socket ps, int family); 34int inet_meth_getpeername(lua_State *L, p_socket ps, int family);
34int inet_meth_getsockname(lua_State *L, p_socket ps, int family); 35int inet_meth_getsockname(lua_State *L, p_socket ps, int family);