On Fri, 27 Nov 2009, [email protected] wrote:
I am doing simple http Get request and the URL can be finite url or can be a streaming URL. I want to know if the connection to the URL is closed.
Do you really? If the connection is closed or not is normally beyond what an application should care about and libcurl does not expose that info.
libcurl does a transfer and it returns info to the app how the transfer went, and that's what an app should normally have to care about.
The connection may be closed if there is some network delay(timeouts) or interface down or the server has closed the connection.
If the transfer failed somehow, libcurl returns that info.
I have only 1 easy handle in multi handle stack. I need to know if runningHandles == 0 is criteria to decide closed connection in this case.
runningHandles == 0 means that there is no transfers actively running. It means that the transfers you started before now have completed. You don't know if the connection was closed or not.
I have added the easy handle to the stack in some other portion of the code. What are the reasons for transfer to fail?
You use curl_multi_info_read() to figure out how each transfer ends. -- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
