cURL / Mailing Lists / curl-library / Single Mail

curl-library

How to deal with multi thread call of curl_multi_socket_action?

From: 何震 <sonysuqin_at_gmail.com>
Date: Thu, 13 Dec 2012 10:25:22 +0800

Hi :
Thanks to lijo.

Now I want to write an app which will do asynchronous http call under multi
thread circumstance.
In every thread I call curl_multi_add_handle to add an easy handle which
already initialized to a global multi handle,and I use boost asio as event
driver,but when testing I meet some core dump problems and there's no way
out now.

There're some problems puzzling me:
1.What does CURLOPT_CLOSESOCKETFUNCTION exactly do?What the exact meaning
of the second argument 'timevalue' ?Where is it from?
2.As I run several transfers at the same time,is't neccesary to run a
singgle timer for every transfer?
3.Is libcurl thread safe?In other word,is easy hander or multi handle
thread safe?

Or if there is any suggestion to solve my target of using multi handle
under multi thread, any will be appreciated.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-13