~mysocket.~cpp
来自「基于JSP的网络聊天室系统,功能明了易懂」· ~CPP 代码 · 共 52 行
~CPP
52 行
// 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 + =
减小字号Ctrl + -
显示快捷键?