ServerSocket.cpp
资源名称:Transfer.rar [点击查看]
上传用户:jessejm
上传日期:2022-06-04
资源大小:1914k
文件大小:1k
源码类别:
P2P编程
开发平台:
Visual C++
- // ServerSocket.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Transfer.h"
- #include "ServerSocket.h"
- #include "TransferDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CServerSocket
- CServerSocket::CServerSocket()
- {
- m_dlg=NULL;
- }
- CServerSocket::~CServerSocket()
- {
- }
- // Do not edit the following lines, which are needed by ClassWizard.
- #if 0
- BEGIN_MESSAGE_MAP(CServerSocket, CSocket)
- //{{AFX_MSG_MAP(CServerSocket)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- #endif // 0
- /////////////////////////////////////////////////////////////////////////////
- // CServerSocket member functions
- void CServerSocket::OnAccept(int nErrorCode)
- {
- // TODO: Add your specialized code here and/or call the base class
- ASSERT(m_dlg);
- m_dlg->HandleAccept();
- CSocket::OnAccept(nErrorCode);
- }
- void CServerSocket::OnClose(int nErrorCode)
- {
- // TODO: Add your specialized code here and/or call the base class
- ASSERT(m_dlg);
- m_dlg->HandleClose();
- CSocket::OnClose(nErrorCode);
- }
- void CServerSocket::Init(CTransferDlg *dlg)
- {
- ASSERT(dlg);
- m_dlg=dlg;
- }