Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
curl_multi_timeout(3) | libcurl Manual | curl_multi_timeout(3) |
NAME
curl_multi_timeout - how long to wait for action before proceedingDESCRIPTION
An application using the libcurl multi interface should call curl_multi_timeout(3) to figure out how long it should wait for socket actions - at most - before proceeding.EXAMPLE
struct timeval timeout;
long timeo;
curl_multi_timeout(multi_handle, &timeo);
if(timeo < 0)
/* no set timeout, use a default */
timeo = 980;
timeout.tv_sec = timeo / 1000;
timeout.tv_usec = (timeo % 1000) * 1000;
/* wait for activities no longer than the set timeout */
select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
TYPICAL USAGE
Call curl_multi_timeout(3), then wait for action on the sockets. You figure out which sockets to wait for by calling curl_multi_fdset(3) or by a previous call to curl_multi_socket(3).AVAILABILITY
This function was added in libcurl 7.15.4.RETURN VALUE
The standard CURLMcode for multi interface error codes.SEE ALSO
curl_multi_fdset(3), curl_multi_info_read(3), curl_multi_socket(3), curl_multi_setopt(3)May 17, 2022 | libcurl 7.84.0 |