[AGENT++] callback function for receive() ?

Sönke Griem soenke.griem at tennet-hh.de
Thu Jun 12 11:40:40 CEST 2008


Hi,

I integrate the agent++/snmp++ package into a existing Windows 
application. This application is a non-preemptives Multitasking-System. 
SNMP handling is only a subtask.

So I have the problem that my software hangs in the receive loop and my 
snmp thread never will be left.

  RequestList* reqList;

  do {
      req = reqList->receive(0);

      if (req)
      {
          mib->process_request(req);
      }
  }
  while(req);
 
 Is there any alternative to implement the receive() functionality e.g. 
as a callback function which only called when a request received ?
 
 As a quick solution I poll the receive() function every second but this 
makes the responce time very slowly.
 
 Best regards
   Soenke




More information about the AGENTPP mailing list