49
49
<p class="level0">CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
51
51
<p class="level0">An application using the libcurl multi interface should call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> to figure out how long it should wait for socket actions - at most - before proceeding.
52
<p class="level0">Proceeding means either doing the socket-style timeout action: call the <a class="bold" href="./curl_multi_socket.html">curl_multi_socket(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT and the <span Class="bold">easy</span> argument set to CURL_EASY_TIMEOUT, or simply calling <a class="bold" href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach.
52
<p class="level0">Proceeding means either doing the socket-style timeout action: call the <span Class="bold">curl_multi_socket_action(3)</span> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT, or call <a class="bold" href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach.
53
53
<p class="level0">The timeout value returned in the long <span Class="bold">timeout</span> points to, is in number of milliseconds at this very moment. If 0, it means you should proceed immediately without waiting for anything. If it returns -1, there's no timeout at all set.
54
54
<p class="level0">Note: if libcurl returns a -1 timeout here, it just means that libcurl currently has no stored timeout value. You must not wait too long (more than a few seconds perhaps) before you call curl_multi_perform() again. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
55
55
<p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>