cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: multi-interface

From: Peter Thiess <pthiess_at_adobe.com>
Date: Wed, 1 Aug 2007 17:23:44 +0100

Hi Richard,

Thank you very much, this is exactly the information needed; I think of transferring multiple files at the same time. By stacking I meant a mechanism which works like a serial queue.
Do I understand it correctly that libcurl is opening multiple channels and transfers files at the same time? If so how many is it scalable? Do you know if examples are available?

Thanks again for your support!

-- peter

>> -----Original Message-----
>> From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-
>> bounces_at_cool.haxx.se] On Behalf Of Richard Atterer
>> Sent: Mittwoch, 1. August 2007 16:48
>> To: curl-library_at_cool.haxx.se
>> Subject: Re: multi-interface
>>
>> Hi Peter,
>>
>> On Wed, Aug 01, 2007 at 03:07:54PM +0100, Peter Thiess wrote:
>> > I'm a newbie in curl and I read about the multi interface; can anybody
>> > clarify if this is a stacking mechanism or if this parallelizes file
>> > transfer (e.g. multi-channel FTP) internally. I am thinking of ways to
>> > speed up FTP.
>>
>> Not sure what you mean by "stacking" - the multi interface indeed
>> parallelizes many transfers. This way, your application only needs to
>> have
>> one thread even though several downloads are active. Downloads happen in
>> the same way as with the simple API, you can just have many at the same
>> time.
>>
>> If you want to use several connections to download chunks of the same
>> file
>> in parallel (which BTW is naughty, as it wastes server resources! It even
>> violates a HTTP "SHOULD" clause [*]), then you will need to write code
>> yourself to reassemble the chunks.
>>
>> Cheers,
>>
>> Richard
>>
>> [*] RFC 2616, 8.1.4: "A single-user client SHOULD NOT maintain more than
>> 2
>> connections with any server or proxy."
>> --
>> __ _
>> |_) /| Richard Atterer | GnuPG key: 888354F7
>> | \/¯| http://atterer.net | 08A9 7B7D 3D13 3EF2 3D25 D157 79E6 F6DC
>> 8883 54F7
>> ¯ '` ¯
Received on 2007-08-01