cURL / Mailing Lists / curl-library / Single Mail

curl-library

Not able to send data using multi_socket API

From: smruti kumari <smrutikumari777_at_gmail.com>
Date: Mon, 16 May 2016 22:39:12 +0530

Hi Daniel,

For http I have choosen mult_socket option. I am trying to send some post
request but the message is not going out of my machine. I am getting below
log in my output screen . I am using curl-7.48.0 version.

Consle output:

* STATE: INIT => CONNECT handle 0x699bb8; line 1108 (connection #-5000)
* Added connection 0. The cache now contains 1 members
* Trying 67.227.166.174...
* STATE: CONNECT => WAITCONNECT handle 0x699bb8; line 1161 (connection #0)
* Connected to www.netcloudsystems.com (67.227.166.174) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x699bb8; line 1260
(connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x699bb8; line 1278 (connection #0)
* STATE: DO => DONE handle 0x699bb8; line 1319 (connection #0)
* Curl_done
* Connection #0 to host www.netcloudsystems.com left intact
* Expire cleared
* STATE: INIT => CONNECT handle 0x699bb8; line 1108 (connection #-5000)
* Added connection 0. The cache now contains 1 members
* Trying 67.227.166.174...
* STATE: CONNECT => WAITCONNECT handle 0x699bb8; line 1161 (connection #0)

I am doing below steps.
1. init multi and easy interface
2. set the option to easy handle (CURLOPT_CONNECT_ONLY)
3. invoke curl_easy_perform() to connect to remote host
4. Add easy handle to multi handle
5. invoke curl_multi_socket_action() API
5. when it invoke socket callback I invoke curl_multi_assign()
I saw every CURL API return code is CURL_OK/CURLM_OK.

Could you please tell me where my approch is worng ?

Thanks,
Smruti

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-16