#include <curl/curl.h> CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout);
|multi_handle||Pointer to a multi handle.|
|timeout||Pointer to a timeout value in milliseconds.|
If the operation was successful,
CURLM_OK is returned. Otherwise, a specific
CURLM libcurl Error Code is returned.
An application using the libcurl multi interface should call
curl_multi_timeout to decide how long it should wait for socket actions, at most, before proceeding.
Proceeding requires either performing the socket-style timeout action: call the
curl_multi_socket_action function with the
sockfd argument set
CURL_SOCKET_TIMEOUT, or calling
curl_multi_perform if using the simpler and older multi interface approach.
The timeout value returned in the long that timeout points to, is in number of milliseconds at the exact moment. If
0, proceed immediately without waiting.
If it returns
-1, there is no timeout set.
An application that uses the
multi_socket API should not use this function, but should instead use
CURLMOPT_TIMERFUNCTION option for correct and desired behavior.
-1timeout, it indicates that libcurl currently has no stored timeout value. Do not wait too long (more than a few seconds) before calling
This function was added in libcurl 7.15.4.
2013/05/08 Automated cleanup pass.
2012/05/04 Initial version.