cURL / Mailing Lists / curl-library / Single Mail

curl-library

Avoid write callbacks

From: Florian Weimer <fw_at_deneb.enyo.de>
Date: Wed, 13 Mar 2013 13:01:35 +0100

Is there a way to avoid callbacks, while still supporting incremental
retrieval of data? In a nutshell, I'm looking for an iterator-like
interface.

I could use the multi interface with a custom write function which
writes to an in-memory buffer. I would run the event loop until that
buffer contains some data. My iterator would return data from the
buffer as long as some is available. It would run some iterations of
the event loop to get more data.

But I wonder if there is an easier way to accomplish this.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-13