-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatSocket.cpp
More file actions
64 lines (52 loc) · 1.26 KB
/
Copy pathChatSocket.cpp
File metadata and controls
64 lines (52 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// ChatSocket.cpp : implementation file
//
#include "stdafx.h"
#include "Ex_Chat.h"
#include "ChatSocket.h"
#include"Ex_ChatDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChatSocket
CChatSocket::CChatSocket()
{
}
CChatSocket::~CChatSocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CChatSocket, CAsyncSocket)
//{{AFX_MSG_MAP(CChatSocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CChatSocket member functions
void CChatSocket::OnAccept(int nErrorCode)
{
if(nErrorCode==0)
m_pDlg->OnAccept();
CAsyncSocket::OnAccept(nErrorCode);
}
void CChatSocket::OnClose(int nErrorCode)
{
if(nErrorCode==0)
m_pDlg->DoClose();
CAsyncSocket::OnClose(nErrorCode);
}
void CChatSocket::OnConnect(int nErrorCode)
{
if(nErrorCode==0)
m_pDlg->OnConnect();
CAsyncSocket::OnConnect(nErrorCode);
}
void CChatSocket::OnReceive(int nErrorCode)
{
if(nErrorCode==0)
m_pDlg->OnReceive();
CAsyncSocket::OnReceive(nErrorCode);
}