cURL / Mailing Lists / curl-library / Single Mail

curl-library

fetching fixed url from different interfaces & connection cache problem

From: Pavel Gushcha <pavimus_at_gmail.com>
Date: Fri, 28 Jan 2011 10:11:49 +0200

Hi, All!

I wrote application using curl_multi. This application must fetch each
second some fixed url, but each time from different ip (i have 20 ip
on my server). Firstly, i wrote application without requirement to use
different IPs and all works good. Then i added option to each curl
easy handle before adding it to curl_multi:

curl_easy_setopt(easy_handle,CURLOPT_INTERFACE,<next ip>)

And i expected, that this is all, what needed. But really ip was not
changing each request. It was changed around each 20 requests. After
problem exploration i figured out, that adding following option to
easy handle fixes the problem:

curl_easy_setopt(easy_handle,CURLOPT_FORBID_REUSE,1)

This is bug or feature? if this is feature, may be is good to add some
words to documentation, because this moment is not unclear to all
developers, that using libcurl?

PS: sorry for my bad english.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-28