📄 myclientsocketthread.h
字号:
#pragma once
#include "ErrInfo.h"
class CMyClientSocket;
class CMyClientSocketThread
{
public:
CMyClientSocketThread(
HWND hwndMsgTarget,
UINT uiMsgEndThread,
const CString& strUrl,
UINT uiPort = 80);
virtual ~CMyClientSocketThread();
void WaitForEndThread() const;
int GetReceivedBytes();
void SetCancel();
bool IsCanceled() const;
const CErrInfo* GetErrInfo() const;
void GetRecvData(CByteArray& recvData) const;
protected:
static UINT myThreadProc(LPVOID pParam);
bool myThreadProcSub();
bool httpGet(const CString& strHostName, const CString& strUrlPath, const CString& strUrlExtra);
protected:
CWinThread* m_pThread;
CMyClientSocket* m_pSocket;
HWND m_hwndMsgTarget; // 僗儗僢僪廔椆儊僢僙乕僕捠抦愭
UINT m_uiMsgEndThread; // 僗儗僢僪廔椆捠抦儊僢僙乕僕
CString m_strUrl; // GET偡傞URL
UINT m_uiPort; // 億乕僩斣崋
CString m_strAgent;
CErrInfo m_errInfo;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -