📄 connect.h
字号:
#if !defined(AFX_CONNECT_H__61C78C4B_EEBF_4282_8021_FF01C1DDB101__INCLUDED_)
#define AFX_CONNECT_H__61C78C4B_EEBF_4282_8021_FF01C1DDB101__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Connect.h : header file
//
//Errorcodes
#define PROXYERROR_NOCONN 1
#define PROXYERROR_REQUESTFAILED 2
#define PROXYERROR_AUTHREQUIRED 3
#define PROXYERROR_AUTHTYPEUNKNOWN 4
#define PROXYERROR_AUTHFAILED 5
#define PROXYERROR_AUTHNOLOGON 6
//Proxytypes
#define PROXYTYPE_NOPROXY 0
#define PROXYTYPE_SOCKS4 1
#define PROXYTYPE_SOCKS5 2
class CGDoc;
/////////////////////////////////////////////////////////////////////////////
// CConnect command target
class CConnect : public CSocket
{
// Attributes
public:
// Operations
public:
CConnect(CGDoc* pDoc);
virtual ~CConnect();
// Overrides
public:
virtual BOOL Connect( LPCTSTR lpszHostAddress, UINT nHostPort, BOOL bProxy = FALSE );
void SetProxy(int nProxyType, CString ProxyHost, int ProxyPort, CString ProxyUser, CString ProxyPass, BOOL bUseSocks5Logon);
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConnect)
public:
virtual void OnReceive(int nErrorCode);
virtual void OnClose(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CConnect)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
BOOL PConnect( const SOCKADDR* lpSockAddr, int nSockAddrLen );
CGDoc* m_pDoc;
int m_nProxyPeerPort;
ULONG m_nProxyPeerIp;
int m_nProxyError;
int m_nProxyType;
CString m_ProxyHost;
int m_nProxyPort;
CString m_ProxyUser;
CString m_ProxyPass;
BOOL m_bUseSocks5Logon;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONNECT_H__61C78C4B_EEBF_4282_8021_FF01C1DDB101__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -