Den 21-07-2010 21:53, Brendan Tauras skrev: > Now you're probably thinking why do asynchronous Single API requests. > I have been tasked to write a snmp monitoring program. It must > request different OIDs at different time intervals, and one request > cannot hold up another (e.g. walks can take a while). I am using > threads for timing different intervals and asynchronous methods to > keep multiple requests in a single interval from delaying each other.
Well, that explains asynchronous, but why single session? If you really use threads, why not a thread for each session, and then the pointer will be a thread local variable? Otherwise, have you seen the async tutorial http://www.net-snmp.org/wiki/index.php/TUT:Simple_Async_Application Anyway, I don't see the problem of saving the opaque pointer inside the struct that the callback brings back to you with its opaque pointer. /Niels -- Niels Baggesen - @home - Ã…rhus - Denmark - [email protected] The purpose of computing is insight, not numbers --- R W Hamming ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
