diff --git a/cs-lab34.cpp b/cs-lab34.cpp index 38131c4..5b94103 100644 --- a/cs-lab34.cpp +++ b/cs-lab34.cpp @@ -56,7 +56,11 @@ download(const string& address) { cout << curl_easy_strerror(res); exit(1); } - + curl_off_t speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed); + if (!res) { + fprintf(stderr, "Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed); + } curl_easy_cleanup(curl); }