cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl-multi: Pausing download with connection open

From: Richard Atterer <richard_at_list04.atterer.net>
Date: Sat, 17 Jul 2004 11:47:04 +0200

On Fri, Jul 16, 2004 at 11:48:41AM +0200, Daniel Stenberg wrote:
> On Thu, 15 Jul 2004, Richard Atterer wrote:
> >Sometimes, I want to pause a download, but keep its TCP connection(s) open.
>
> This is not supported. Removing and re-adding an easy handle will not work
> to achive this.
>
> I'm open for suggestions and patches on how such a pausing would be
> controlled.

Hmm, libcurl could maintain a "paused" flag for each easy handle, and when
that flag is set, the handle's sockets could no longer be returned in the
fd_set result of curl_multi_fdset().

I think there is a danger that timeouts, low speed limit etc will fire if
you pause something for a bit longer, the respective counters will need to
be reset when the "paused" flag is cleared.

Also, it's possible that the application will run out of connections sooner
if there's some kind of limit... What does CURLOPT_MAXCONNECTS apply to,
overall open connections, connections to a single host, or overall open,
but unused connections?

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯
Received on 2004-07-17