cURL / Mailing Lists / curl-library / Single Mail


Re: can Curl use socket() created by application?

From: amit paliwal <>
Date: Fri, 19 Aug 2011 00:49:04 -0400

In this case, will I be able to send an HTTP POST and get its reply...

I did not find any sample example to use this options, I need to use them in
my HTTP application. I hope this will work for HTTP.

When we use CONNECT_ONLY option, after doing some transfer by
curl_easy_send() and curl_easy_recv(), is it possible to use
curl_easy_perform() to send HTTP POST message. I read somewhere that the
curl handle created by CONNECT_ONLY can not be used in curl_easy_perform()
to send further HTTP messages. Is there some way to do this? I do not want
to have another handle, or better I say that I do not want to have another
connection with the server.

On Sat, Aug 13, 2011 at 4:27 PM, Daniel Stenberg <> wrote:

> On Sat, 13 Aug 2011, amit paliwal wrote:
> Just want to know that is it possible for Curl to use socket created by
>> application to use in further calls to curl_easy_perform().
> Yes!
> You use CURLOPT_OPENSOCKETFUNCTION to pass in the socket, and then you use
> Requires a fairly new libcurl.
> --
> /
> ------------------------------**------------------------------**-------
> List admin:**listinfo/curl-library<>
> Etiquette:**etiquette.html<>


List admin:
Received on 2011-08-19