|
// CCTPNetReceiver - CTP reciever
// CTCPNetReceiver - TCP reciever
// CUDPNetReceiver - UDP reciever
// They partly duplicate each other to allow to customize support of every
// protocol easily
// Declaration file
//
// (c) Lev Naumov, CAMEL Laboratory
// E-mail: camellab@mail.ru
// For more information see http://camel.ifmo.ru or
// http://www.codeproject.com/internet/ctp.asp
/////////////////////////////////////////////////////////////////////////////
class CCTPNetReceiver: public NetReceiver
{
public:
// Constructor. Parameter mainwnd is a pointer to main applications window
CCTPNetReceiver(CWnd* mainwnd) {m_pMainWnd=mainwnd;};
// Is called when have received data pointed by data
virtual void OnReceive(void* data);
// Is called when there was an error, described with data pointed by data
virtual void OnError(void* data);
protected:
// Pointer to main applications window
CWnd* m_pMainWnd;
};
class CTCPNetReceiver: public NetReceiver
{
public:
// Constructor. Parameter mainwnd is a pointer to main applications window
CTCPNetReceiver(CWnd* mainwnd) {m_pMainWnd=mainwnd;};
// Is called when have received data pointed by data
virtual void OnReceive(void* data);
// Is called when there was an error, described with data pointed by data
virtual void OnError(void* data);
protected:
// Pointer to main applications window
CWnd* m_pMainWnd;
};
class CUDPNetReceiver: public NetReceiver
{
public:
// Constructor. Parameter mainwnd is a pointer to main applications window
CUDPNetReceiver(CWnd* mainwnd) {m_pMainWnd=mainwnd;};
// Is called when have received data pointed by data
virtual void OnReceive(void* data);
// Is called when there was an error, described with data pointed by data
virtual void OnError(void* data);
protected:
// Pointer to main applications window
CWnd* m_pMainWnd;
};
|
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
Lev Naumov.
MSc in Computer Science. Graduated from Computer Technologies Department of Saint-Petersburg State University of Information Technologies, Mechanics and Optics.
Worked as C/C++ and Java programmer. Now - the research worker in "CAMEL Laboratory" and PhD student in Computer Technologies Department of Saint-Petersburg State University of Information Technologies, Mechanics and Optics.
Has scientific achievements in field of physics, automata theory, cellular automata theory, cluster computing. There are some publications.