cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: canceling curl_easy_perform() operation

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sun, 3 Jun 2007 22:49:09 -0700

On Mon, Jun 04, 2007 at 10:58:00AM +0530, Sapana Hanchate wrote:
> Hi All
>
> I am using curl lib for implementing HTTP client. To cancel the requested URL,
> I am using ProgrssCallBack function which returns non zero value if
> user presses cancel button.
>
> But suppose client is trying to contact wrong IP address and user send cancel
> request, in this scenario my code is not working as ProgressCallBack function
> is not called unless and until TCP connection between client and server is
> established.
>
> Is there any way by which I can stop the http [SYN] packets going to wrong IP
> if user request for cancel?
>
> Any help on this will be really great. Thanks in advance.

You should be able to use the CURLOPT_SOCKOPTFUNCTION callback instead. Or,
use the multi interface and asynchronous DNS and kill the easy handle whenever
you feel like it.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-06-04