curl-library
Re: Closing an open connection with curl easy handle
Date: Sun, 2 Oct 2011 00:13:33 +0200 (CEST)
On Fri, 30 Sep 2011, Thibaut Le Guilly wrote:
> I succeeded to stop the transfer by returning an appropriate value from the
> write callback when I need to. But I don't really like this solution because
> it will have to wait for the server to send a notification in order for the
> write callback to be called, which may take some time.
There's also a progress callback you can use.
> I also tried with the multi interface, and also succeeded to properly close
> the connection by removing the easy handle from the multi stack, but then
> the problem is that I have to call the curl_multi_perform() function each
> time I want to check if the server sent notifications.
Why is curl_multi_perform() a bigger problem than calling curl_easy_perform()
?
> Looking at the multi interface I saw the curl_multi_socket_action, but I'm
> not sure I totatlly understood this functionality. Can I use that to detect
> when the server push information to the client?
Yes you can (and so can the other APIs as well).
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-10-02