cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Close callback [Discussion]

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 8 Mar 2008 22:37:13 +0100 (CET)

On Sat, 8 Mar 2008, Ingo Krabbe wrote:

>>> (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.
>
> What is wrong with it I just look if the returned handles have changed
> during the curl_multi_socket_action calls.

Oh, right. Sorry, then that's indeed not wrong. It was just a bit of an
unusual solution so I did a bad assumption.

>> 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.
>
> Hmm, I wouldn't have thought that this is so hard to understand. My code
> isn't that long, though the package might be big, since it contains a PDF
> file, that you can only compile, when you have TeX installed, so I included
> it for convenience.

It's complicated. It's not pure C. It depends on a wide range of 3rd party
tools and libs (Qt, Cweb, TeX afaiu). It uses lots of concept I have no idea
about. Inlcuding all the magic those 3rd party tools provide.

> The actual code test-it.w of the example is about 450 lines of code, with
> all comments and empty lines.

test-it.w is 409 lines, and I can follow about 40 of them (the ones that use
libcurl). It does lots of magic that isn't described as comments but simply
rely on the reader of the code to understand and know them. I don't.

> My point is the transfer of data between libcURL and the three event types
> as they are used in the example:

Really, I don't even understand that there are three event types nor how they
are used.

Sorry, but unless you describe your problem to me in a way I can understand, I
can't help you.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-03-08