⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hhttp.h

📁 积下的一点C++编程序库源码
💻 H
字号:
// HHttp.h: interface for the CHHttp class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_HHTTPCONNECT_H__1D547E36_F258_4E5F_96C5_73235588C580__INCLUDED_)
#define AFX_HHTTPCONNECT_H__1D547E36_F258_4E5F_96C5_73235588C580__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


//文件名		: HHttp.h

//功能			: 简单的HTTP

//创建			: 2004.4.8


//作者			: 韩国静
//

#include "HTcpSock.h"
#include "HStdFile.h"

class CHHttp 
{
	int m_Port;
	UNI_DWORD m_IP;
	static char m_szBaseHead[];
	static char m_szHttpVer[];
public:
	static UNI_DWORD ParseURL(char *url,UNI_WORD &wPort);
	//返回头信息大小
	int Head(char *url,char *headBuf, int bufLen);
	void SetHost(UNI_DWORD dwIP,UNI_WORD Port);
	BOOL Get(char *url,char *saveFile);
	CHHttp();
	virtual ~CHHttp();

protected:
	int FindDoubleLf(char *pBuf,int bufLen);
	//返回文件大小
	int HttpRecvFile(char *recvBuf,int bufLen ,char *fileName, CHTcpSock &s);
private:
	int GetFileLen(char *head);
};

#endif // !defined(AFX_HHTTPCONNECT_H__1D547E36_F258_4E5F_96C5_73235588C580__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -