[AGENT++] about callbacl function for notify reciver
Jochen Katz
katz at agentpp.com
Tue Jan 16 23:32:08 CET 2007
Hi,
> i put the pdu and target copied from the params in to the queue of
> another threads, my program will core dump. strangely, when my
> mDebugCallback was defined as the same as the callback() in
> consoleExamples/receive_trap.cpp, it's all OK!
beside the fact that the new crashes, I see no cause for the crash in
the stack trace. So I can only suggest to start with the receive_trap
callback code and move step by step to your code...
> i noticed that it's a single-threaded implementation, how can be
> implement a multi-threaded notification receiver depending on Snmp
> class?
It's the way you're doing it: trigger a thread within the callback. With
the current snmp++ there is one receive thread that receives the network
packet, decodes it and triggers the callback and then receives the next
packet.
Regards,
Jochen
More information about the AGENTPP
mailing list