<pclass="level0">curl_multi_timeout - how long to wait for action before proceeding <aname="SYNOPSIS"></a><h2class="nroffsh">SYNOPSIS</h2>
<pclass="level0">#include <curl/curl.h>
<pclass="level0">CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout); <aname="DESCRIPTION"></a><h2class="nroffsh">DESCRIPTION</h2>
<pclass="level0">
<pclass="level0">An application using the libcurl multi interface should call <aclass="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.
<pclass="level0">Proceeding means either doing the socket-style timeout action: call the <spanClass="bold">curl_multi_socket_action(3)</span> function with the <spanClass="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT, or call <aclass="bold"href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach.
<pclass="level0">The timeout value returned in the long <spanClass="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.
<pclass="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. <aname="RETURN"></a><h2class="nroffsh">RETURN VALUE</h2>
<pclass="level0">The standard CURLMcode for multi interface error codes. <aname="TYPICAL"></a><h2class="nroffsh">TYPICAL USAGE</h2>
<pclass="level0">Call <aclass="bold"href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>, then wait for action on the sockets. You figure out which sockets to wait for by calling <aclass="bold"href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> or by a previous call to <aclass="bold"href="./curl_multi_socket.html">curl_multi_socket(3)</a>. <aname="AVAILABILITY"></a><h2class="nroffsh">AVAILABILITY</h2>
<pclass="level0">This function was added in libcurl 7.15.4. <aname="SEE"></a><h2class="nroffsh">SEE ALSO</h2>