cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Robert Banfield <rbanfield_at_weogeo.com>
Date: Thu, 19 May 2011 18:08:28 -0400

On 05/19/2011 04:57 PM, Daniel Stenberg wrote:
> 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!
>

I know :) I tried to keep it small as I didn't want to ruin the spirit
of the example. If you don't want to apply it, I'd just note in the
description that more than one URL_FILE should not be used simultaneously.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-20