📄 connectthread.h
字号:
#if !defined(AFX_CONNECTTHREAD_H__78F10C1A_D695_49E4_9B0B_35A190601FAC__INCLUDED_)
#define AFX_CONNECTTHREAD_H__78F10C1A_D695_49E4_9B0B_35A190601FAC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ConnectThread.h : header file
//
#include "Server.h"
#include "SplitStr.h"
#include <afxtempl.h>
#include "Match.h"
/////////////////////////////////////////////////////////////////////////////
// CConnectThread thread
class CFiveChessServerDlg;
class CConnectThread : public CWinThread
{
DECLARE_DYNCREATE(CConnectThread)
protected:
CFiveChessServerDlg * m_pOwner; //指向类的指针
CConnectThread(); // protected constructor used by dynamic creation
BOOL m_bDone; //用以控制线程执行
SOCKET m_pSocket;
sockaddr_in m_pAddr; //客户端程序的地址
CSplitStr Split; //切分字符串
fd_set fdSocket; //存放套接字的组
CString ssend; //发送字符串
char srev[1024]; //接收字符串
int lineno; //列号
int rowno; //行号
CMatch m_pMatch; //判断是否可以下以及是否已分胜负
// Attributes
public:
void SetOwner(CFiveChessServerDlg* pOwner) {m_pOwner=pOwner;};//取类的指针
void SetClient(SOCKET pSocket) {m_pSocket=pSocket;};
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConnectThread)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
virtual int Run();
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CConnectThread();
// Generated message map functions
//{{AFX_MSG(CConnectThread)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONNECTTHREAD_H__78F10C1A_D695_49E4_9B0B_35A190601FAC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -