curl-library
Re: Can I use multiple handles at the same time time, not in parallel, in 1 thread.
Date: Tue, 27 Nov 2012 11:31:38 +0000 (GMT)
Thanks Yehezkel,
So you are saying there is no problem with having 2 handles allocated on the stack, that I am not obliged to
keep reusing a handle, that I can use one or the other independent of each other. Thanks, Just what I want.
________________________________
From: Yehezkel Horowitz <horowity_at_checkpoint.com>
To: Fiona Sisk <fionasisk_at_yahoo.ie>; libcurl development <curl-library_at_cool.haxx.se>
Sent: Tuesday, 27 November 2012, 7:32:27
Subject: RE: Can I use multiple handles at the same time time, not in parallel, in 1 thread.
> Here is my program. It sounds like I need to change it? What do you think?
It will work, but you will not use your handlers in the same time.
> curl_easy_perform(curl_handle....)
Note that this is a blocking call.
> if (something){
> curl_handle2=curl_easy_init();
You can also just call to curl_easy_reset(curl_handle), and re-use the same exact handle to perform the 2nd transfer.
> curl_easy_perform(curl_handle2....)
This is a different time (just after the first transfer was ended), but you will have 2 curl handles allocated on your stack – no problem with that.
HTH
Yehezkel Horowitz
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-27