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.
This commit is contained in:
committed by
Daniel Stenberg
parent
7de4cc35f8
commit
7d7df83198
@@ -33,8 +33,6 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
||||
CURLcode Curl_connecthost(struct connectdata *conn,
|
||||
const struct Curl_dns_entry *host, /* connect to
|
||||
this */
|
||||
curl_socket_t *sockconn, /* not set if error */
|
||||
Curl_addrinfo **addr, /* the one we used */
|
||||
bool *connected); /* truly connected? */
|
||||
|
||||
/* generic function that returns how much time there's left to run, according
|
||||
|
||||
Reference in New Issue
Block a user