Сравнить коммиты

..

1 Коммитов

Автор SHA1 Сообщение Дата
artemzelenov
dc11a6ec5c сделал варик 3 2023-06-05 15:30:12 +03:00

Просмотреть файл

@@ -49,15 +49,23 @@ download(const string& address)
if(curl)
{
CURLcode res;
curl_off_t speed;
curl_easy_setopt(curl, CURLOPT_URL, address.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
res = curl_easy_perform(curl);
if (res != CURLE_OK)
{
fprintf(stderr, "curl_easy_perform() failed: %s\n",curl_easy_strerror(res));
exit(1);
}
res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
if(!res)
{
cerr<<"Download speed bytes/sec: " <<speed;
}
curl_easy_cleanup(curl);
}