cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question about curl_multi_perform, callbacks, and presenting a pull interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 24 Aug 2012 00:15:33 +0200 (CEST)

On Thu, 23 Aug 2012, Rich Bramante wrote:

> I had considered this approach but was fearful that in the case where
> the server was returning a large amount of data quickly, curl would be
> in a constant read-callback loop and and my library would not be able
> to return control back out to the caller to start draining the data
> possibly causing my library to buffer the entire response in memory.
> Since the client can download an arbitrarily large amount of data I
> did not pursue this.

Right, but libcurl will not "read everything that comes until there's nothing
more to read" so it should be a finite number of bytes.

I would say the biggest problem is if you use automatic decompression of data
as then it can probably become a significant amount if a very easy
compressible data stream is sent.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-24