📄 netreceivers.h
字号:
// 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;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -