curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Persistent connections / https

From: Mellergård, Daniel via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 14 Jan 2022 19:05:17 +0000

Hi,

I have an application which uses the multi interface. Within the application there are multiple requests being made to different servers, so it acts something similar to a browser. I need to be able to reuse connections to servers, especially in the case of https.

From sources on the internet, I have found that this should be made automatically as long as the curl easy handle is not cleaned up. And in the same way it’s also said that “just keep using the same easy handle”.

From the application perspective, since I have several requests to different servers and a layer handling all communication. Will I need to keep track of which easy handles are used for which server (and maybe also for which session)? That’s quite a lot of management code that’s needed if so… (It seems to me that each transfer is made on a separate handle, and when the transfer is finished the handle may be reused.)

Also, for the curl multi handle, basically the same question. The same multi handle can be used for different server request (simultaneously), I guess?

So as you can see, I’m a bit lost regarding the overall philosophy. I’d be thankful if someone could help me on the way.

As for my code, it’s working asynchronously with the Curl interface. That is, one thread that interfaces Curl, and serves all transfers towards the application.

BR,
Daniel


This electronic communication and any attachments may contain confidential and proprietary information of Maxar, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received.

Maxar reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives.

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-01-14