cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

how to stop curl_easy_perform()

From: Dragos MOINESCU <dmoinescu_at_bitdefender.com>
Date: Thu, 13 Sep 2007 15:21:14 +0300

Hello

I have a problem in stoping a curl_easy_perform() from another thread. I
tried to curl_easy_cleanup() that handle but got SIGSEGV (which in my
opinion is normal behavior).
My question is how to handle the following situation:
1. $ nc -l -p 8080
2. $ ./test-curl localhost:8080

The client connects to localhost:8080 and sends the request but the server
doesn't respond with no data. The problem is that I need to kill ./test-curl
application with a SIGINT and it MUST exit nicely (to free every resources).
Is there a possibility to close the socket(s) the handler uses?

I understand that curl_easy cannot be used to simultaneous download
resources from different http sites although it might have more connections
opened. Thus it "knows" the active socket it handles. So, I believe there
might be a function called curl_easy_stop() which can be called from another
thread in order to stop curl_easy_perform(). Although this function may
appear in the future, I need an elegant solution for now.

Does anyone have any ideas?

Thanx

Dragos MOINESCU,
Head of Web Development Team
+4 0729 880 972
http://www.bitdefender.com
Received on 2007-09-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET