// Copyright © 2010-2012 sss //. // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. //. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. //. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef SPEEDTEST_H #define SPEEDTEST_H #include "headers.h" class speedtest { public: size_t test(config::proxy_entry_base*); speedtest(const std::string& url, config &c) : test_url(url), curl(NULL), cfg(c) {} private: struct memory_struct { char *memory; size_t size; }; static size_t curl_data_callback(void *contents, size_t size, size_t nmemb, void *userp); std::string test_url; CURL *curl; config &cfg; }; #endif //SPEEDTEST_H