cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: IP addresses of redirected servers

From: <binziwang_at_gmail.com>
Date: Tue, 22 Feb 2011 19:22:34 +0000

Thanks for the reply, Dan,

There are two issues with CURLOPT_OPENSOCKETFUNCTION:

(1) If it happens that an existing connection is reused, then
CURLOPT_OPENSOCKETFUNCTION would not be called, would it?
(2) We try to be low-level socket agnostic, so we are reluctant to call
low-level socket functions directly.

Bin

On Feb 22, 2011 10:38am, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Tue, Feb 22, 2011 at 10:00:45AM -0800, Bin Wang wrote:

> > We use libcurl with CURLOPT_FOLLOWLOCATION option turned on. We have a
> need to

> > obtain the IP addresses of all the servers libcurl tries to connect
> along the

> > whole redirection process.

> >

> > Since libcurl currently does not provide this, I am thinking about
> extending

> Methinks you haven't read the documentation closely enough...

> > libcurl. I can think of two approaches of doing this:

> >

> > (1) Add a new user provided callback function. Every time when libcurl
> tries to

> > connect to a server, the callback function is called with the server IP

> > address.

> The CURLOPT_OPENSOCKETFUNCTION does exactly this.

> >>> Dan

> -------------------------------------------------------------------

> List admin: http://cool.haxx.se/list/listinfo/curl-library

> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-22