curl-library
[PATCH] Add "Happy Eyeballs" for IPv4/IPv6.
Date: Sat, 26 Oct 2013 14:48:51 +0200
Add "Happy Eyeballs" for IPv4/IPv6.
This patch invokes two socket connect()s nearly simultaneously, and
the socket that is first connected "wins" and is subsequently used for
the connection. The other is terminated.
There is a very slight IPv4 preference, in that if both sockets connect
simultaneously IPv4 is checked first and thus will win.
Happy Eyeballs is the default behaviour with this patch. I did not add
an option to disable it since it can be disabled in effect by telling
curl to only resolve IPv4 or IPv6 addresses (-4 or -6 on the command-line
or CURL_IPRESOLVE_Vx in the libcurl api).
Björn Stenberg (1):
Add "Happy Eyeballs" for IPv4/IPv6.
lib/connect.c | 298 ++++++++++++++++++++++++++++-----------------------------
lib/connect.h | 2 -
lib/ftp.c | 5 +-
lib/multi.c | 13 ++-
lib/url.c | 8 +-
lib/urldata.h | 2 +
6 files changed, 164 insertions(+), 164 deletions(-)
-- 1.7.10.4 ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-10-26