📄 downloadconn.h
字号:
/*
下载的应用接口
//初始化,建立连接
CDownloadConn(LPTSTR lpHost,UINT port);
//增加下载文件,路径必须存在
lpszDownloadUrl 远程url 如: /file/
localSavePath 本地路径 如: c://download/
lpszFileName 文件名 如: index.html
bool AddDownloadFile(LPCTSTR lpszDownloadUrl,LPCTSTR lpszSavePath,LPTSTR lpszFileName);
//开始下载.
void StartTask();
//得到网络流量
int GetRate();
//得到下载速率
float GetPercentage();
*/
#pragma once
#include "DownloadList.h"
#include <windows.h>
#include "NetFlowRecoder.h"
class CDownloadConn:private CDownloadList
{
//public:
protected:
LPTSTR m_lpHost;
UINT m_port;
CNetFlowRecoder *m_netFlow;
//CDownloadList m_list;
public:
CDownloadConn(LPTSTR lpHost,UINT port);
virtual ~CDownloadConn(void);
bool AddDownloadFile(LPCTSTR lpszDownloadUrl,LPCTSTR lpszSavePath,LPTSTR lpszFileName);
void SendTaskRequest(list<DOWNLOADLIST*> *taskList);
void StartTask();//开始下载任务列表的内容.
// bool IsCompleted();
int GetRate();
float GetPercentage();
protected:
static void Run(void* );//线程函数
static void RefreshSpeed(void* );//线程函数
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -