]> granicus.if.org Git - curl/commit
Add "Happy Eyeballs" for IPv4/IPv6.
authorBjörn Stenberg <bjorn@haxx.se>
Sat, 26 Oct 2013 12:17:33 +0000 (14:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 27 Oct 2013 10:19:53 +0000 (11:19 +0100)
commit7d7df831981feebdbfeb21c12d6c068312a6e4b6
tree0f9020e62bfbc3fa74b2d7a9200f03cf5fe4e1ae
parent7de4cc35f81aa6c3cdb8b377a27843bcabdaec48
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.
lib/connect.c
lib/connect.h
lib/ftp.c
lib/multi.c
lib/url.c
lib/urldata.h