cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 13 Aug 2011 22:27:58 +0200 (CEST)

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
the CURLOPT_SOCKOPTFUNCTION to return CURL_SOCKOPT_ALREADY_CONNECTED.

Requires a fairly new libcurl.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-13