|
// MySocket.cpp : implementation file
//
#include "stdafx.h"
#include "Sock.h"
#include "MySocket.h"
#include "SockDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMySocket
CMySocket::CMySocket()
{
}
CMySocket::~CMySocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CMySocket, CAsyncSocket)
//{{AFX_MSG_MAP(CMySocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CMySocket member functions
void CMySocket::SetParent(CDialog *pWnd)
{
// Set the member pointer
m_pWnd = pWnd;
}
void CMySocket::OnAccept(int nErrorCode)
{
// Were there any errors?
if (nErrorCode == 0)
// No, call the dialog's OnAccept function
((CSockDlg*)m_pWnd)->OnAccept();
}
void CMySocket::OnConnect(int nErrorCode)
{
// Were there any errors?
if (nErrorCode == 0)
// No, call the dialog's OnConnect function
((CSockDlg*)m_pWnd)->OnConnect();
}
void CMySocket::OnReceive(int nErrorCode)
{
// Were there any errors?
if (nErrorCode == 0)
// No, call the dialog's OnReceive function
((CSockDlg*)m_pWnd)->OnReceive();
}
void CMySocket::OnClose(int nErrorCode)
{
// Were there any errors?
if (nErrorCode == 0)
// No, call the dialog's OnClose function
((CSockDlg*)m_pWnd)->OnClose();
}
void CMySocket::OnSend(int nErrorCode)
{
// Were there any errors?
if (nErrorCode == 0)
// No, call the dialog's OnSend function
((CSockDlg*)m_pWnd)->OnSend();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here