Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to pause execution of code?
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Best way to pause execution of code?
Miscellaneous
Thread ID:
00738869
Message ID:
00738869
Views:
68
Hello everyone!

I am writing a switch control library in C# which uses SNMP to communicate with HP and Cisco switches. One of my methods is to retrieve the list of MAC addresses on a certain port on a switch. With the Cisco switches I have to get the entire list of MAC addresses on the switch then look up the port for each switch and determine if it is the port I'm looking for and if it is add it to my port list. However, with the Cisco switches we have it seems that if I make too many requests at a time the switch returns an error. What I would like to do then is slow the requests being sent so that a request for what port is only done every half second or second. With FoxPro I could simply using the WAIT command, but what is the best way to do this with C#?

I have looked at using a Timer and have certain method called to find out if the MAC address exists on that certain port then add it to the port list, but how do you bring it parameters? Or do I need to set up variables globally in the class? Thanks for all your help!!
Next
Reply
Map
View

Click here to load this message in the networking platform