SocketFromServer.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:1k
- // SocketFromServer.cpp : implementation file
- //
- #include "stdafx.h"
- #include "GpsSC.h"
- #include "SocketFromServer.h"
- #include "ProcSM.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CSocketFromServer
- CSocketFromServer::CSocketFromServer()
- {
- }
- CSocketFromServer::CSocketFromServer(CProcSM *m_pParent)
- {
- m_pWnd = m_pParent;
- }
- CSocketFromServer::~CSocketFromServer()
- {
- }
- // Do not edit the following lines, which are needed by ClassWizard.
- #if 0
- BEGIN_MESSAGE_MAP(CSocketFromServer, CSocket)
- //{{AFX_MSG_MAP(CSocketFromServer)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- #endif // 0
- /////////////////////////////////////////////////////////////////////////////
- // CSocketFromJKCenter member functions
- //下列的Socket事件,设置其与文件相关联,重载代码如下:
- void CSocketFromServer::OnClose(int nErrorCode)
- {
- // TODO: Add your specialized code here and/or call the base class
-
- if (nErrorCode==0)
- {
- ((CProcSM *)m_pWnd)->OnSocketClose();
- }
- }
- void CSocketFromServer::OnReceive(int nErrorCode)
- {
- // TODO: Add your specialized code here and/or call the base class
-
- if(nErrorCode==0)
- {
- ((CProcSM *) m_pWnd)->OnReceiveFromServer();
- }
- }
- // CSocketFromServer member functions