libcurl — Keep Connection "open" to Upload Multiple Files (FTP) libcurl — Keep Connection "open" to Upload Multiple Files (FTP) curl curl

libcurl — Keep Connection "open" to Upload Multiple Files (FTP)


Just re-use the same handle, and it will keep the connection open as much as possible and subsequent transfers will re-use the previous one.

When you use the easy interface, the connection cache is kept within the easy handle. If you instead use the multi interface, the connection cache will be kept within the multi handle and will be shared among all the easy handles that are used within the same multi handle.


As you pointed out by citing the source code, you'll have to just fix libcurl; as you already found the place to start, why don't you do that? Adding functionality that you need yourself is one of the great strengths of the free and open source software model.