cURL / Mailing Lists / curl-library / Single Mail


Re: Option to specify the type of IP address for TCP connect

From: Daniel Stenberg <>
Date: Wed, 1 Aug 2012 23:09:10 +0200 (CEST)

On Mon, 30 Jul 2012, Bin Wang wrote:

> When establishing a TCP connection, libcurl tries all the IP addresses,
> including both IPv4 and IP6 ones, until a TCP connection is successfully
> established or all the IP addresses are failed. libcurl already provides the
> option for specifying the type of IP address to resolve the destination host
> name. I was wondering if it makes sense to provide another option to specify
> the type of IP address used for TCP connect.

Isn't the specified type (as in which IP version) already used for both
resolve and connect ?

> Then when a destination host name is resolved to "whatever" IP address, I
> have the flexibility to connect using one type of the address or both types,
> and I am able to do thing like giving different connect timeout to different
> type of IP address.

You can do this already. You can easily figure out the IP address (and "type")
and then time-out whenever you please. Or what am I missing?

List admin:
Received on 2012-08-01