Re: max_fd if curl_multi_fdset() is called directly after curl_multi_add_handle()

2017-11-08 Thread Daniel Stenberg
On Wed, 8 Nov 2017, Wolfgang Steinwender wrote: curl_multi_timeout() says maximum 0ms, curl_multi_fdset() at least 100ms. curl_multi_fdset() suggests 100ms if you have no socket - and no timeout. A valid value from curl_multi_timeout() *always* takes precedence over max_fd = -1 or only

Re: Calling library functions from within callbacks

2017-11-08 Thread Wolfgang Steinwender
On 08.11.2017 14:21, Daniel Stenberg wrote: On Wed, 8 Nov 2017, Wolfgang Steinwender wrote: In https://curl.haxx.se/mail/lib-2017-10/0081.html Daniel said calling library functions from within callbacks is not allowed. Yeah, that's the general rule. Could this be documented somewhere?

Re: max_fd if curl_multi_fdset() is called directly after curl_multi_add_handle()

2017-11-08 Thread Wolfgang Steinwender
On 08.11.2017 14:37, Daniel Stenberg wrote: On Wed, 8 Nov 2017, Wolfgang Steinwender wrote: Documentation for curl_multi_fdset: When libcurl returns -1 in max_fd [..] You then need to wait a while before you proceed and call curl_multi_perform anyway. How long to wait? We suggest 100

Re: max_fd if curl_multi_fdset() is called directly after curl_multi_add_handle()

2017-11-08 Thread Daniel Stenberg
On Wed, 8 Nov 2017, Wolfgang Steinwender wrote: Documentation for curl_multi_fdset: When libcurl returns -1 in max_fd [..] You then need to wait a while before you proceed and call curl_multi_perform anyway. How long to wait? We suggest 100 milliseconds at least [..] But: If i call

Re: Calling library functions from within callbacks

2017-11-08 Thread Daniel Stenberg
On Wed, 8 Nov 2017, Wolfgang Steinwender wrote: In https://curl.haxx.se/mail/lib-2017-10/0081.html Daniel said calling library functions from within callbacks is not allowed. Yeah, that's the general rule. Could this be documented somewhere? Maybe right at the affected callbacks? Yeah, I

max_fd if curl_multi_fdset() is called directly after curl_multi_add_handle()

2017-11-08 Thread Wolfgang Steinwender
Documentation for curl_multi_fdset: When libcurl returns -1 in max_fd [..] You then need to wait a while before you proceed and call curl_multi_perform anyway. How long to wait? We suggest 100 milliseconds at least [..] But: If i call curl_multi_fdset() directly after curl_multi_add_handle(),

Calling library functions from within callbacks

2017-11-08 Thread Wolfgang Steinwender
In https://curl.haxx.se/mail/lib-2017-10/0081.html Daniel said calling library functions from within callbacks is not allowed. Could this be documented somewhere? Maybe right at the affected callbacks? Contradictory, in the example https://curl.haxx.se/libcurl/c/http2-serverpush.html

curl handles and multi thread

2017-11-08 Thread surya chandrika via curl-library
Hi all, >From this link it says https://curl.haxx.se/libcurl/c/threadsafe.html You must never share the same handle in multiple threads. You can pass the handles around among threads, but you must never use a single handle from more than one thread at any given time. Usecase: (cpp) 1. Get a