clientsocket.h
来自「使用Socket和多线程技术实现远程通信」· C头文件 代码 · 共 67 行
H
67 行
#ifndef AFX_CLIENTSOCKET_H
#define AFX_CLIENTSOCKET_H
// ClientSocket.h : header file
//
#include <afxsock.h>
/*
* 说 明:客户端Socket类,负责与中心服务器的连接
* 编 写:杨帆
* 编写时间:2005-08-21
*/
/////////////////////////////////////////////////////////////////////////////
// CClientSocket command target
#define WM_SOCKET_RECV WM_USER + 200
class CClientSocket : public CSocket
{
// Attributes
public:
// Operations
public:
CClientSocket();
CClientSocket(CWnd* pParentWnd);
virtual ~CClientSocket();
public:
CWnd* m_pParentWnd;
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClientSocket)
public:
virtual void OnSend(int nErrorCode);
virtual void OnReceive(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CClientSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
};
/////////////////////////////////////////////////////////////////////////////
char ConvertHexChar(char ch);
void SocketErrorMessage(const CString& sFun);
int BytesToString(const unsigned char* src, int len, char* dest);
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLIENTSOCKET_H__116037EA_D937_49DD_8A07_9695102C376B__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?