ShestovDN 2 лет назад
Родитель e43905e635
Сommit c8bdf2b276

@ -32,7 +32,6 @@ if (promt)
sin>> number_count;
in.numbers.resize(number_count);
for (size_t i = 0; i < number_count; i++)
{
@ -64,17 +63,29 @@ download(const string& adress)
if(curl)
{
CURLcode res;
curl_easy_setopt(curl, CORLOPT_URL, adress);
curl_easy_setopt(curl, CURLOPT_URL, adress.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA,&buffer);
res=curl_easy_perform(curl);
curl_easy_cleanup(curl);
if(res!=CURLE_OK)
{
cout<<curl_easy_strerror;
exit(1);
}
if(res== CURLE_ok)
{
res=curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
if(CURLE_OK ==res)
{
cerr<<"connecting time: "<<connect;
}
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
}
curl_easy_cleanup(curl);
}
return input_data(buffer, false);
}

Загрузка…
Отмена
Сохранить