我们监视大量设备.
我想构建一个非常快速的程序,该程序可以扫描50,000个ip地址的列表,并希望为每个ip地址查看特定端口是否响应.
I was wanting to build a really fast program that could scan a list of 50,000 ip addresses and for each ip address I want to see if a particular port is responsive.
任何人都可以建议一种方法吗?
Can anyone suggest a way to do this ?
我们已经尝试过使用多线程
We have tried multi threading using
将myProbe设置为新的Net.Sockets.TcpClient myProbe.Connect("192.168.1.254",80)
Dim myProbe As New Net.Sockets.TcpClient myProbe.Connect("192.168.1.254", 80)
我们发现,如果ip地址处于脱机状态,则需要花一些时间进行响应,因此自然而然地我们减少了超时时间,但是随后我们发现了一些处于联机状态的设备,并以设备主动拒绝连接"的异常消息进行响应 等等"
we have found that if an ip address is offline it takes a while to respond so naturally we decreased the timeout but then we discovered some devices that are online and respond with an exception message of "the device actively refused the connections etc"
然后我们尝试一下,但是这大大减慢了该过程.
We then put a try catch in but that slowed the process down dramatically.
关于如何使他的超级快速和高效的任何想法?
Any ideas on how to make his super fast and efficient ?
预先感谢
推荐答案
我只能想到您可能在几个拥有50,000个IP地址的地方工作.如果您在这些地方之一工作,则应该让网络人员可以回答这个问题.请阅读此内容.
I can only think of a couple of places that you might work that own 50,000 IP addresses. If you work at one of those places you should have people on the network staff that can answer this. Read this please.
social.msdn.microsoft/Forums/vstudio/zh-CN/053a0a87-e9b8-42e7-b483-d6d47c41278e/contributors-how-to-avoid帮助开发恶意代码?forum = vbgeneral
更多推荐
多线程IP/端口扫描仪
发布评论