hi Rajanikanth, Add this line to get the verbose information on the connection, this will help you to analyze it further.
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); Regards Raghu From: [email protected] [mailto:[email protected]] On Behalf Of Rajanikanth Sent: 2010 Jul 20 5:53 PM To: [email protected] Subject: doubt on curl_easy_perform Hi, Is there any forum exists, to get clarifications on the cURL function calls? Actually when I am using the function call 'curl_easy_perform', at run time it is getting hanged without any response. I concluded it because I am not getting any return value which I am printing after execution of the function. Following is my sample program. (NOTE: There is one other executable listening a socket at '127.0.0.1:8888' and it just returns what it received) #include <stdio.h> #include <curl/curl.h> int main(void) { CURL *curl; CURLcode res; struct curl_slist *headerlist=NULL; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:8888"); headerlist = curl_slist_append(headerlist, "Content-Type: text/html"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); /* Now specify the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=RAJANI\r\nproject=curl\r\n\r\n"); printf("B4 perform\n"); res = curl_easy_perform(curl); if (res == 0) printf("After perform\n"); else printf("Perform returns = %d\n", res); curl_easy_cleanup(curl); } return 0; } Thanks & Regards, Rajanikanth N.V +91 89789 33889
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
