curl-library
Re: Real-time data transfer: curl_easy_pause?
Date: Wed, 28 Sep 2011 14:53:22 +0200 (CEST)
On Wed, 28 Sep 2011, Julien wrote:
> Oops, I may have confused you writing about CURL_WRITEFUNC_PAUSE in my first
> message. I am not downloading but uploading data. This data is becoming
> available through an internal process over which I have no control, and I am
> sending this data through libcurl API. Is it OK to block in the read
> callback until some more data is available in this case?
Aha. But right, the same logic applies in the other direction. You can wait in
your read callback until data arrives.
You might have a reason to use the pausing approach instead if you want to
keep the progress callback going or similar.
If you end up doing very long waits or pauses (many minutes), you should
probably consider using TCP_KEEPALIVE at some interval so that firewalls and
NATs and what not don't go playing tricks on your connections. Of course
depending where and how you run your application.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-09-28