Initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// ResponseManager.h: interface for the CResponseManager class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ResponseManagerH
|
||||
#define ResponseManagerH
|
||||
|
||||
#include "thread.h"
|
||||
#include "MessageDef.h"
|
||||
|
||||
typedef struct tagResponse {
|
||||
TNETMESSAGE response;
|
||||
int iTimeCount;
|
||||
// UINT ip;
|
||||
// USHORT port;
|
||||
int iExtra;
|
||||
} TRESPONSENODE;
|
||||
|
||||
#include <list>
|
||||
using namespace std;
|
||||
typedef list< TRESPONSENODE* > TRESPONSELIST;
|
||||
|
||||
class CResponseManager
|
||||
{
|
||||
public:
|
||||
CResponseManager();
|
||||
virtual ~CResponseManager();
|
||||
|
||||
bool NewResponse( /*UINT ip, USHORT port, */ int iExtra, TNETMESSAGE* pResponse );
|
||||
TNETMESSAGE * GetResponse( /*UINT ip, USHORT port,*/ TNETMESSAGE* pRequest );
|
||||
void OnTimer();
|
||||
|
||||
private:
|
||||
CSema m_smProcess;
|
||||
TRESPONSELIST m_lstResponses;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user