multi:Timeout -- how long to wait for action before proceeding
ms = multi:Timeout()
An application using the libcurl multi interface should call multi:Timeout() to figure out how long it should wait for socket actions - at most - before proceeding.

Proceeding means either doing the socket-style timeout action: call the multi:SocketAction() function with the sockfd argument set to #CURL_SOCKET_TIMEOUT, or call multi:Perform() if you're using the simpler and older multi interface approach.

The timeout value returned 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.

An application that uses the multi_socket API SHOULD NOT use this function, but SHOULD instead use multi:SetOpt() and its #CURLMOPT_TIMERFUNCTION option for proper and desired behavior.

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 multi:Perform() again.


current timeout value

Show TOC