Files
DBService/ComposeService/ResponseManager.h
T
2026-07-09 11:27:59 +08:00

40 lines
829 B
C++

// 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