curl-library
Re: multithreads or multi interface
From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Wed, 7 Sep 2005 12:23:29 +0200
Date: Wed, 7 Sep 2005 12:23:29 +0200
Hi,
On Die 06.09.2005 16:12, Martin Vogt wrote:
>
>I have appended the new prog, it does not solve the problem.
>I think it has something to do, that after the
>curl_multi_add_handle(multi_handle, ctx);
>The fdset is empty, at least maxfd is -1.
I have add:
---
>void insert_more_request(CURLM *multi_handle) {
.
.
> curl_easy_setopt(ctx, CURLOPT_DNS_USE_GLOBAL_CACHE,1);
curl_easy_setopt(ctx, CURLOPT_VERBOSE , 1);
> mstatus=curl_multi_add_handle(multi_handle, ctx);
if(mstatus){
cout << " >>>>>>>>>>>>>>>can't add "<<left_request<< "th request";
break;
}
---
yes in know it isn't ver nice to get out from the for-loop in this way
but it's a quick solution ;-)
I called it with './curltest -u http://www.none.at/ -n 3 -c 2' and get
the following output:
---
.
.
.
doing insert:0
* Connection #0 to host www.none.at left intact
maxfd:-1
>>timeout!
removed:2 requests:3
removed:2 requests:3
msgs_in_queue:0
curlmsg:0x80538f8
EASY HANDLE:0x805c620
* Closing connection #0
removed one
maxfd:-1
>>timeout!
removed:3 requests:3
bytecounter:60 still:0
---
As we can see the connection is 'intact', i don't know if this is good
or bad for 'curl_multi_fdset'
The full output is there => http://none.at/curltest.out
Hth
al ;-)
Received on 2005-09-07