curl-library
Re:Re: How to interrupt libcurl immediatly when connect to a server?
Date: Wed, 25 Mar 2015 13:00:32 +0800 (CST)
Yes, I mean end the connection stage to the server. Thanks so much! I will try these method.:-)
At 2015-03-25 12:50:00,"Raja Gopal M" <smrajagopal_at_gmail.com> wrote:
>I want to interrupt libcurl immediately when libcurl connect to a server. I know there is a option CURLOPT_CONNECTTIMEOUT, but it can't interrupt immediately.
Also, take a look at http://curl.haxx.se/docs/faq.html#I_want_a_different_time_out. To time out a connection which is in-progress based on your application needs.
On Tue, Mar 24, 2015 at 11:34 PM, Raja Gopal M <smrajagopal_at_gmail.com> wrote:
> Interruption may come out anytime in my program, so is there a good method to handle this situation in libcurl.
Did you mean to end the connection to the server ? If yes, curl_easy_cleanup() is your friend (assuming you are using libcURL's easy interface), which does many more than just ending the connection. Read http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html to know more about it.
On Tue, Mar 24, 2015 at 9:56 PM, dong <ilovedxq_at_163.com> wrote:
Hi all,
I want to interrupt libcurl immediately when libcurl connect to a server. I know there is a option CURLOPT_CONNECTTIMEOUT, but it can't interrupt immediately.
Interruption may come out anytime in my program, so is there a good method to handle this situation in libcurl.
Thanks so much!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
-- Thanks Raja Gopal M smrajagopal_at_gmail.com -- Thanks Raja Gopal M smrajagopal_at_gmail.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-25