static int writer(void *data, size_t size, size_t nmemb, TStringStream *buffer) {
int result = 0;
if (buffer != NULL) {
buffer->Write(data, size * nmemb);
result = size * nmemb;
}
return result;
}
void DSend(String s) {
CURL *curl;
CURLcode res;
curl = curl_easy_init();
TStringStream *buffer = new TStringStream("", 65001);
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
}
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
delete buffer;
}