## 自己封装snmp消息处理的代理类
## csnmpproxythread.h
#ifndef CSNMPPROXYTHREAD_H
#define CSNMPPROXYTHREAD_H
#include "global.h"
#include "baseThread.h"
#include "csnmpclientbase.h"
class CSnmpProxyThread : public BaseThread
{
public:
static CSnmpProxyThread * getInstance();
void addSnmpMsg(CSnmpMsg & msg);
bool getSnmpMsg(CSnmpMsg & msg);
typedef list<CSnmpMsg> SnmpMsgList;
private:
CSnmpProxyThread()
{
pthread_mutex_init(&m_lock ,NULL);
m_snmpMsgList.clear();
}
~CSnmpProxyThread()
{
if (m_client){
delete m_client;
m_client = NULL;
}
}
protected:
void run();
private:
SnmpMsgList m_snmpMsgList;
pthread_mutex_t m_lock;
pthread_cond_t m_cond;
CSnmpClientBase * m_client;
};
class SelectSnmpMsgThread : public BaseThread{
public:
SelectSnmpMsgThread(){}
protected:
VOID run(