cURL / Mailing Lists / curl-library / Single Mail

curl-library

Help with Curl Library to extract socket and establish communication

From: Mayank Kumar (mayankum) <mayankum_at_cisco.com>
Date: Thu, 6 Sep 2012 21:24:46 +0000

Here is the scenario I want to execute :-

1. Use curl to post some data to a server using curl_easy_perform

2. Extract the socket used in 1 using CURLINFO_LASTSOCKET

3. Use the socket got from 2 to determine and receive further data from the server(using select and recv on the socket) from time to time on an ongoing basis until the communication is teared.

I saw that the CURLINFO_LASTSOCKET is only used with CONNECT_ONLY, so I am wondering if my above usage makes sense or wont work. I am currently trying this scenario out but was wondering if this would work or not.

Another question was in what thread context the CURLOPT_WRITEFUNCTION is called.

Is it curl's own thread context or the thread context in which function was registered.

Regards
Mayank

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-06