curl-library
Re: CURLM Chain of events
Date: Fri, 22 Jan 2016 22:46:43 +0000 (UTC)
> What if I decide to add a new easy handle (do another transfer) after kick
> starting everything will the new transfer be initiated automatically or do I
> need to call call curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...)
> again.
> You can add and remove easy handles as you see fit and libcurl will update
> your socket and timer callbacks accordingly.
Pardon my ignorance, putting aside internal implementation details why do I need
to explicitly call curl_multi_socket_action(curl_m_handle, CURL_SOCKET_TIMEOUT
right after curl_multi_add_handle in order to kick start the library and not when adding
or removing easy handles afterwards. Is there a design motivation here or is that just
how it currently works?
Same question with respect to the timeout_callback. It seems like I'm supposed to install
a non-repeating timer for the sole purpose of calling curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...).
Why doesn't libcurl handle this internally. Is it a design goal to externalize the timer to allow support for
different timer implementations ?
> If you're feeling adventurous, you can try out reading these chapters in my
> pending book about curl, starting here: http://ec.haxx.se/libcurl.html
Sure will :)
>(The book is still work in progress so all kinds of feedback is appreciated)
Where would be an appropriate place to post feedback?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-22