curl-and-python

Re: Curl object reuse

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Jul 2011 14:36:36 +0200 (CEST)

On Thu, 7 Jul 2011, Daniel Havey wrote:

[disclaimer: I'm no good with python, but I know libcurl so I'll respond
anyway]

> I would like persistent connections. I'm trying to reuse the handles in my
> multi curl.

When using the libcurl multi interface, the connection pool is kept within the
multi handle so all new handles added to the multi handle can potentially
re-use a connection that a previous handle used.

> I have some code hacked from retriever-multi. Basically I just do the
> initialisation then call a subroutine that runs perform and waits for the
> results.

It seems to wait for all transfers to complete from what I could see.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2011-07-08