// ServSock.cpp
// Implementation of CServSock Class
//
//  Derived from CAsyncSocket to manage socket communications

#include "stdafx.h"
#include "UDPServ.h"
#include "ServSock.h"
#include "UDPServDoc.h"
#include <winsock.h>


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

CServSock::CServSock(CUDPDoc* pDoc)  // Constructor
{
	m_pUDoc = pDoc;			// Set the pointer to the document class
}


void CServSock::SetPort(UINT port)
{
	m_nUDPPort = port;
}

void CServSock::OnReceive(int nError)
{
	CSocket::OnReceive(nError);
	m_pUDoc->RxDataIn(nError);
}

CServSock::~CServSock()  // Destructor
{

}
