curl-library
Re: Close callback [Discussion]
Date: Sat, 8 Mar 2008 20:23:22 +0100 (CET)
On Sat, 8 Mar 2008, Ingo Krabbe wrote:
> Yes you are right. I've done this now and finished the example just as I
> want it to run (process on done requests), though the real work has to be
> done during io callbacks since I need the current request that I work upon:
Can you clarify what you mean with this? If the "real work" need to be done in
"io callbacks" (I assume you mean write callbacks), then why don't you do it
in them? But the request is of course never completed within the io callbacks
so I don't see how the completion of a request is related to what work you
need to do when you get data.
> handle_ofs = global->handles;
> while ( CURLM_CALL_MULTI_PERFORM ==
> (code = curl_multi_socket_action(global->curl,
> fd, 0, &global->handles)) );
> handle_ofs -= global->handles;
This is not correct. curl_multi_socket_action() will write the number of
currently active handles in that counter so your decrement is wrong here.
> if ( handle_ofs != 0 ) {
> /* here the check can be done */
What check?
I find it slightly annoying that you've now posted many mails on this topic,
and I still don't understand what your point is.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-03-08