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.

How to separate connection from request

From: 6dsovh35--- via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 17 Jun 2021 21:48:53 +0000

Hi!

I'm trying to build a transport service that will maintain open connections to various services and send requests off as I receive them. I would like to build a curl session and connect it (including openssl handling) in my parent process and reuse that connection in my child process after it has been forked to actually send the request payload to the destination. I don't know what the request will be when I'm trying to open the connection so would like to keep from making a random curl_easy_perform that is likely to return an error. How can I accomplish this?
I did stumble across a connect_only config that seemed like it would tell curl to only connect, but if I understand it correctly it then disables any reuse on that socket which is not what I'm after. Is what I'm seeking to do possible?

Thanks for your help!



-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-06-17