This is a discussion on Re: synchronous versus asynchronous within the SNMP Coders forums, part of the Networking and Network Related category; There is an example async app on the net-snmp page. http://net-snmp.sourceforge.net/tuto...yncapp/asyncap p....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
There is an example async app on the net-snmp page.
http://net-snmp.sourceforge.net/tuto...yncapp/asyncap p.c I used this code to figure out how to perform asynchronous sends in my own project. Mathew Bielejeski http://www.neon.com Message: 1 Date: Tue, 14 Nov 2006 21:11:48 +0100 From: Alef Veld <alef@xs4all.nl> Subject: Re: synchronous versus asynchronous To: Steve Friedl <steve@unixwiz.net> Cc: net-snmp-coders@lists.sourceforge.net Message-ID: <FD505C79-8F7D-4EF7-8D88-A2A6DACE3219@xs4all.nl> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed So basically if i understand correctly async is using select with nonblocking sockets and a large set of file descriptors? I assume you use that since you stated that net-snmp is not thread-safe. And in addition you just send a whole bunch of udp sendto's in a event loop? that's really something i would like to have. basically i want to write a function that does async snmp and in that same function it calculates the netblock it needs to snmp to by supplying a net/prefix as argument. However, i feel really stupid when looking at the net-snmp library or even example code. It seems bloody complicated :-). I'm now using a modified version of the sync demo app to use with snmpv1 (Seems to work for snmpv2 to?) but as stated before, it sucks up cpu bigtime if it finds a host who it cannot connect to. Greets, and thanks, Alef On Nov 14, 2006, at 7:53 PM, Steve Friedl wrote: ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?p...rge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |
![]() |
| Thread Tools | |
| Display Modes | |
|
|