基本原理是访问稳定的网页来测试速度,或者利用稳定的下载地址来测速,比如QQ.EXE
网页粒度小 测试没有 下载地址 稳定准确
界面MFC完成,网络API使用CURL
HttpClient.cpp
#include "stdafx.h"
#include"HttpClient.h"
#include "HttpRequest.h"
#include "HttpRespone.h"
#include "curl.h"
#include
#include
using namespace std;
static int write_data(void *buffer, size_t size, size_t buffer_size, void *_respone)
{
HttpRespone *respone = (HttpRespone*)_respone;
HttpRequest*request = respone->getHttpRequest();
respone->writeData(buffer, buffer_size);
//request->release();
const HttpCallBack & x = request->getHttpCallback();<