cURL / Mailing Lists / curl-library / Single Mail

curl-library

Multithreaded use of libcurl

From: doa379 <doa379_at_gmail.com>
Date: Tue, 15 Sep 2015 00:27:28 +0100

I'm trying to use libcurl in a distinct pthread but the process gets
stuck in the callback function as the url works like a socket and is
constantly giving out data:

curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callbackFunc);

I would to implement a thread which allows to fork the libcurl process
whilst other threads are still running. Even if the url doesn't finish
giving out data.

What's the best way to implement this?

Is there a better way to implement this other than making discrete and
manual connections to the url?

Using this as a reference:

http://curl.haxx.se/libcurl/c/multithread.html

Thanks for any suggestions.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-09-15