curl_multi_info_read
| Definition: |
include builtins\libcurl.e
{atom easy_handle, CURLcode res, integer msgs_in_queue} = curl_multi_info_read(atom mcurl) |
| Description: |
Read multi stack informationals.
mcurl: the multi_handle to be queried. Ask the multi handle if there are any messages/informationals from the individual transfers. Messages may include informationals such as an error code from the transfer or just the fact that a transfer is completed. More details on these should be written down as well. Repeated calls to this function will return a new easy_handle and result code each time, until a NULL is returned (in easy_handle, at which point res will be a meaningless CURLE_OK) as a signal that there are no more to get at this point. The integer msgs_in_queue will contain the number of remaining messages after this function was called. When you fetch a message using this function, it is removed from the internal queue so calling this function again will not return the same message again. It will instead return new messages at each new invoke until the queue is emptied. Return value: A sequence containing an easy_handle, a result code, and the number of remaining messages. The result code is that of an individual transfer, hence it [genuinely] is a CURLcode rather than a CURLMcode. |
| pwa/p2js: | Not supported. |
| Example: |
/* call curl_multi_perform or curl_multi_socket_action first, then loop
through and check if there are any transfers that have completed */
-- (This is not a complete runnable sample)
while 1 do
{atom easy_handle, CURLcode res, integer nmsgs} = curl_multi_info_read(multi_handle)
if easy_handle=NULL then exit end if
curl_multi_remove_handle(multi_handle,easy_handle)
-- {curlcode,res} = curl_easy_getinfo(easy_handle,??) -- (etc)
transfers -= 1
curl_easy_cleanup(easy_handle)
end while
|
| See Also: | curl_multi_init, curl_multi_cleanup, curl_multi_perform, CURLcode |