cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with curl provided example "fopen.c" involving multi interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 19 May 2011 22:57:28 +0200 (CEST)

On Thu, 19 May 2011, Robert Banfield wrote:

> I found another problem in that the still_running variable in the URL_FILE
> struct tracks whether *any* transfer is in progress, not just that
> particular URL_FILE. This is a problem whenever two simultaneous transfers
> do not complete at the same time. Any data left to be transferred in the
> remaining handle would be forced into main memory until the transfer ended.

Please remember that you're looking at and talking about a mere _example_. It
shows how the API can be used. It isn't meant to be a complete and fully
functional application or library in itself.

Trying to fix all flaws and add proper error detection and ways to make it not
used all memory etc will just make the code much bigger and potentially harder
to read and certainly not help casual readers to easier understand the libcurl
API.

I'm already of the opinion that fopen.c is very very near the limit of too big
for being an example. Please don't make it bigger!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-19