curl-users
Re: questions about easy interface
Date: Sat, 12 Nov 2011 10:43:32 +0100 (CET)
On Mon, 7 Nov 2011, JK Chen wrote:
> 1. How to set up a timer so that when timeout expires, application can
> decide to quit. (using easy interface)
The easy interface implies you use libcurl, then please use the curl-library
list instead!
CURLOPT_TIMEOUT is the option for a maximum time to allow a request to take.
> 2. In the multiple thread sample program, you have used the same IO within
> each thread, do you need not protect the access of the same IO?
The same IO? I don't think the 10-at-a-time example code uses anything in an
unsafe manner than isn't safe.
> 3. If doing multiple thread each with callback writing to memory, you would
> need multiple version of the same callback function?
No...
> If not, you would need to synchronize the function?
If the functions would attempt to write to a common place then you would need
some kind of lock/mutex/synch, yes.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-11-12