cURL / Mailing Lists / curl-library / Single Mail

curl-library

Real-time data transfer: curl_easy_pause?

From: Julien <eldebaran_at_gmail.com>
Date: Wed, 28 Sep 2011 11:25:31 +0200

Hi,

I need to send some data over FTP or HTTP using libcurl. The thing is
that this data is from a live source and I would like to send it as it
becomes available (i.e. not wait until it is fully available to begin
sending it).

I am using easy Interface.

I looked on CURL_WRITEFUNC_PAUSE and curl_easy_pause but I am not sure
how to use these features for my use case. If I get it correctly, I
have to dedicate a thread to my request (creation of the CURL handle,
curl_easy_setopt, curl_easy_perform, read callback), and block this
thread when I have to wait for data (CURL_WRITEFUNC_PAUSE return
code). But how do I send a message to this thread when new data is
becoming available? I could use the progress callback, but I need to
be much more "real-time" than "roughly once per second or sooner".

What is the best way to achieve this?

Thank you,
Julien
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-28