cURL / Mailing Lists / curl-library / Single Mail


Re: multi_cleanup closes easy handles ftp session even if easy handlehas been removed from multi_handle

From: elupus <>
Date: Wed, 4 Apr 2007 16:15:26 +0200

> Why do you cleanup the multi handle in the first places if you keep the
> easy handle anyway?

Since I only need the multi_handle for one easy_handle never anything more.
It seemed silly to keep it around.

I use libcurl as a backend filesystem, where on each read, a few
multi_perform is called to fill an internal buffer up to the requested
number of bytes, wich then is returned to caller. It must be threadsafe so
that multiple transfers can be running on multiple threads totally
independent on eachother. Performance for the transfers themself are not
that important, however reuse of connections are.

I wish a global connection cache could be used, so all connections could be
shared globally. Currently I myself keep track of what server a easy_handle
connected to last time, to be able to resuse the proper one. Should I keep
the multi handle there instead, or are there still states that are cached in
the easy_handle too?

Received on 2007-04-04