curl-library
non-blocking?
From: Christina DRS <mail_at_drsdatarecovery.com>
Date: Tue, 17 Feb 2009 09:03:20 -0500
Date: Tue, 17 Feb 2009 09:03:20 -0500
Hello,
I would like to make this code non-blocking..can anyone help me modify it? I also have a callback method using CURLOPT_WRITEDATA. Is that blocking too?
Thanks!!!!
string data = "test message";
struct curl_httppost *post = NULL;
struct curl_httppost *last = NULL;
char* encoded = curl_easy_escape(_easyHandle, data.c_str(), data.length());
string postit = "TestMessage=";
postit +=encoded;
curl_easy_setopt(_easyHandle, CURLOPT_POSTFIELDS, postit.c_str());
curl_easy_setopt(_easyHandle, CURLOPT_POSTFIELDSIZE, postit.length());
curl_easy_setopt(_easyHandle, CURLOPT_POST, 1L);
curl_easy_perform(_easyHandle);
curl_free(encoded);
curl_formfree(post);
Received on 2009-02-17