cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Anyone working on this TODO feature ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 22 Jan 2007 21:38:19 +0100 (CET)

On Mon, 22 Jan 2007, Sudeep Das wrote:

>>>> Add to curl_easy_getinfo the following:
>>>> GET_HTTP_IP
>>>> GET_FTP_IP
>>>> GET_FTP_DATA_IP
>>>> --
>>>> pass in a char**
>>>> return 0 if connection is not open else return allocated string with ip.
>>>> I only suggest a string to deal with ipv4 vs ipv6.
>
> Questions:
> 1. So this is invoked during read / write callback ? or after a perform ?

That would be for you to decide I guess. I would of course like if both ways
would work, as soon as the info has been received by libcurl.

> 2. What does "return 0 if connection is not open else return allocated
> string with ip" mean ?

If there's no connection to get the IP from I guess.

> I thought the connection would be closed anyway after a perform.

Nope, connections are in fact mostly kept open after a perform to enable
re-use on subsequent requests.

> 3. FTP_DATA_IP ? Ok, lemme go through the RFC. I thought command channel and
> data channel would be connected to the same server.

They are in fact most often used to the same server but a) the server may use
several IP addresses and b) "most often" does not mean always. So yes, the
control and data connection can use different IP addressed.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-22