You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
602 B
C++

#pragma once
#define _AFXDLL
#include <afxwin.h>
#include <iostream>
#include <fstream>
#include <string>
#include <direct.h>
#include "../cpp-httplib/httplib.h"
using namespace std;
using namespace httplib;
class CHttpClient
{
public:
CHttpClient(string IP, int Port);
virtual ~CHttpClient();
bool DownloadAllFile();
bool SendCmd(const string cmd, string & sRespon); //发送命令,返回值为Server响应(字符串)
bool DownloadFile(const string & file_name);
void SetRemote(string IP, int Port) {m_HostIP = IP;m_HostPort = Port; };
private:
string m_HostIP = "127.0.0.1";
int m_HostPort = 1234;
};