📄 ~mysocket.~cpp
字号:
// MySocket.cpp: implementation of the CMySocket class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ChatClient.h"
#include "MySocket.h"
#include "ChatClientDoc.h"
#include "afxsock.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMySocket::CMySocket()
{
//put the member pointer to NULL
m_pDoc=NULL;
}
CMySocket::~CMySocket()
{
//put the member pointer to NULL
m_pDoc=NULL;
}
void CMySocket::SetParent(CChatClientDoc* pDoc)
{
//set the member pointer
m_pDoc=pDoc;
}
void CMySocket::OnReceive(int nErrorCode)
{
//if (nErrorCode==0)
CAsyncSocket::OnReceive(nErrorCode);
m_pDoc->ProcessPendingRead();
}
void CMySocket::OnClose(int nErrorCode)
{
if (nErrorCode==0)
return ;
// m_pDoc->OnClose();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -