From 6368caeb5ab5f628b8021c8ebf4d6df436162aaf Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Thu, 23 Aug 2012 19:31:15 -0300 Subject: 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". --- doc/tcp.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tcp.html b/doc/tcp.html index 5f39d0e..151a4c9 100644 --- a/doc/tcp.html +++ b/doc/tcp.html @@ -125,7 +125,9 @@ local host. Port must be an integer number in the range [0..64K). If address is '*', the system binds to all local interfaces -using the INADDR_ANY constant. If port is 0, the system automatically +using the INADDR_ANY constant or +IN6ADDR_ANY_INIT, according to the family. +If port is 0, the system automatically chooses an ephemeral port.

-- cgit v1.2.3-55-g6feb