ms = multi:Timeout()
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 get 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 get.
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.