[AGENT++] Problem with trap receive...

Jochen Katz katz at agentpp.com
Sat Jan 8 13:07:42 CET 2005


Hi Fedja,

>>for all async action you have to call SNMPProcessPendingEvents() or
>>SNMPProcessEvents() in a loop. snmp++ does not have an internal thread
>>that does this.
> 
> Are there any plans to add this feature into the snmp++ in the near future?
> I mean running an extra thread for this shouldn't be that much of an issue,
> but I might be missing something bigger. Any more info on this?

it's difficult to add this for all usages of Snmp class: What should the 
object do:
- create a poll thread in constructor and stop it in destructor
- create a thread only when it's necessary: if the user wants to listen 
for notifications and if an async response is outstanding.

Depending on the applications both can be good or bad.

Maybe two member functions start_poll_thread(const int select_timeout) 
and stop_poll_thread() will be the best option.

Regards,
   Jochen



More information about the AGENTPP mailing list