cURL / Mailing Lists / curl-library / Single Mail

curl-library

Using multi interface

From: Ellié Computing Open Source Program <opensource_at_elliecomputing.com>
Date: Wed, 26 Oct 2011 14:49:27 +0200

Hello, [ libcurl 7.22.0 / Win64 / USE_THREADS_WIN32=1 ]

the project I work for (ECMerge), now have used libcurl since years. We were using version libcurl 7.16.
for the sake of simplicity, our loop was something like that:

for (;;)
    if new-task then add a easy handle to the multi handle
    if no new_task
        multi_fdset ()
        select
        if timeout, continue;

    multi_perform (easy_handles_running)

    if easy_handles_running decreased,
        handle messages
end for

however, it seems that name resolution is now asynchronous, handled in a separate thread, and the multi_fdset/select pair does not do anything special: it simply times out and my current code simply does nothing. the second multi_perform which is necessary to continue the “pump” by activating the file descriptors never happens...

the sample seems to consider that on timeout of select(), multi_perform should be called.
am I right? if yes, it means that with a 1 second timeout on select, it will always take 1 second at least to get a first time asynchronous name resolution. right?
this is not a big deal, I’d just like to be sure that I understood correctly my problem.

thanks for the good work btw

Best regards
Armel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-26