libuv/include
Saúl Ibarra Corretgé f8f59824c4 unix, win: add ability to create tcp/udp sockets early
Introduce two new APIs:

int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, int flags)
int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, int flags)

The lower 8 bits of the flags field are used for the socket domain.
AF_INET, AF_INET6 and AF_UNSPEC are supported. If AF_UNSPEC is specified
the socket is created lazily, just like uv_{tcp,udp}_init.

Some Windows notes:

getsockname fails with WSAEINVAL if the socket is not bound. This could
potentially be improved by detecting the socket family and filling
the sockaddr_in/6 struct manually.

bind returns WSAEFAULT if we try to bind a socket to the wrong family.
Unix returns EINVAL.

PR-URL: https://github.com/libuv/libuv/pull/400
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-19 09:37:19 +02:00
..
android-ifaddrs.h android: add support of ifaddrs in android 2014-03-16 23:16:25 +01:00
pthread-fixes.h unix: workaround broken pthread_sigmask on Android 2014-03-06 11:54:50 +01:00
stdint-msvc2008.h build: switch to autotools 2013-07-02 01:21:16 +02:00
tree.h build: switch to autotools 2013-07-02 01:21:16 +02:00
uv-aix.h aix: improve AIX compatibility 2014-07-22 22:57:24 +02:00
uv-bsd.h unix, windows: remove unneeded define 2014-05-08 09:08:33 +02:00
uv-darwin.h unix, windows: remove unneeded define 2014-05-08 09:08:33 +02:00
uv-errno.h unix, windows: map EHOSTDOWN errno 2015-02-19 15:38:12 +01:00
uv-linux.h unix, windows: remove unneeded define 2014-05-08 09:08:33 +02:00
uv-sunos.h unix, windows: remove unneeded define 2014-05-08 09:08:33 +02:00
uv-threadpool.h unix, windows: use the same threadpool implementation 2014-06-27 14:27:04 +02:00
uv-unix.h unix, win: add synchronous uv_get{addr,name}info 2015-01-23 01:12:05 +01:00
uv-version.h 2015.06.06, Version 1.6.1 (Stable) 2015-06-05 19:45:58 +02:00
uv-win.h memory: add uv_replace_allocator 2015-03-05 20:02:16 +01:00
uv.h unix, win: add ability to create tcp/udp sockets early 2015-06-19 09:37:19 +02:00