cURL / Mailing Lists / curl-library / Single Mail


Re: connection pooling?

From: Daniel Stenberg <>
Date: Tue, 8 Jan 2002 16:48:55 +0100 (MET)

On Tue, 8 Jan 2002, rick vaillancourt wrote:

> if I kept the same easy _handle hanging around, does it know if a
> connection is in-use or not? Should I (can I) be inspecting the
> connections on the curl_handle for availability?

It knows, there's no need for you to check anything (and there's no way to do
that anyway).

When subsequent requests are made on a connection curl believes is still
alive, it'll first verify that it still is, and if not it'll re-connect to
the site and perform the request. You won't know if the connection was
persistant or not.

Thus, you should not need to care, you should just try to re-use the same
handle as much as possible to get the best possible connection re-use.

    Daniel Stenberg -- curl groks URLs --
Received on 2002-01-08