📄 mmyfacesock.h
字号:
#ifndef _MYFACESOCK_
#define _MYFACESOCK_
#include <Winsock2.h>
class CBaseSocket
{
public:
void Close();
int Receive(char *buff,int bufflen);
int Send(char *buff,int len);
void thread_process();
CBaseSocket();
~CBaseSocket();
virtual void OnReceive(int nErrorCode);
virtual void OnClose(int nErrorCode){};
void startthread();
HANDLE thread_handle,threadtest_handle;
DWORD ThreadID,ThreadtestID;
int testcnt;
static void thread(void *pp);
SOCKET newsock;
// int length;
char buf[1024];
int rval;
bool connected;
bool exist;
};
/////////////////////////////////////////////////////////////////////////////
// CMySock command target
//class cmdshell;
class CMySock : public CBaseSocket
{
// Attributes
public:
// Operations
public:
CMySock();
~CMySock();
// Overrides
public:
// virtual void OnConnect(int nErrorCode);
virtual void OnReceive(int nErrorCode);
// virtual void OnSend(int nErrorCode);
virtual void OnClose(int nErrorCode);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -