cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi-interface

From: Richard Atterer <richard_at_2007.atterer.net>
Date: Wed, 1 Aug 2007 16:47:41 +0200

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