curl-library
Strange connection closed
Date: Wed, 14 Jul 2004 11:07:59 +0200
Hi,
I have got a following problem. As I have read in documentation when I am
using curl_easy_cleanup function it is used to close HTTP connection.
I do not want to close connection, so I am not using curl_easy_cleanup, but
still I cannot send more data because connection is closing by my program,
even if the program is ended with curl_easy_perform.
Maybe I need to set more curl_easy_setopt options ?
thx.
int write(void *buffer,size_t size, size_t nmemb, void *stream)
{
register int realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)stream;
m = buffer;
return realsize;
}
curl_easy_setopt(curl,CURLOPT_URL,"http://...");
curl_easy_setopt(curl,CURLOPT_POST,1);
curl_easy_setopt(curl,CURLOPT_POSTFIELDS,TextToSend);
curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,write);
res = curl_easy_perform(curl);
##curl_easy_cleanup(curl);
Received on 2004-07-14