cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATH] check ip callback

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Sep 2007 15:23:33 +0200 (CEST)

On Wed, 12 Sep 2007, Dan Fandrich wrote:

>> We just implemented a new callback exactly for that. The callback is called
>> for every resolved IP address, and callback function function must return
>> -1 if bad address or 0 if ok.
>
> It would be useful if such a callback could also be used to replace the IP
> address to be used for the connection as well. That's a feature that is
> requested regularly on this list.
>
> What about extending the existing curl_sockopt_callback callback function
> instead of creating a new one?

I second both these suggestions.

The little question that could arise for the case when another address is
returned, is possibly if that would be stored somewhere for the next time
around, but I guess it would be simplest if we just said that the next time
the same IP is used the exact same procedure will occur.

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