Fast Port Scanner
-
Hi everybody, my application (A) opens a port 35000. An external application (B) has the possibility to connect on this port 35000. If the application A is launched 3-times it opens the port 35000, for the second the port 35001 and so far... Now i created a little tool to check which ports are open. a simple loop which increments the Portnumber from 30000 to 30256. But it takes 1 second for each port, so more than 256 seconds for all these possible ports... In the loop i make each time a
new IPEndPoint(...
and
new Socket(....
Does it run faster in asynchronous mode? Big thanks for help :)
-
Hi everybody, my application (A) opens a port 35000. An external application (B) has the possibility to connect on this port 35000. If the application A is launched 3-times it opens the port 35000, for the second the port 35001 and so far... Now i created a little tool to check which ports are open. a simple loop which increments the Portnumber from 30000 to 30256. But it takes 1 second for each port, so more than 256 seconds for all these possible ports... In the loop i make each time a
new IPEndPoint(...
and
new Socket(....
Does it run faster in asynchronous mode? Big thanks for help :)
baerten wrote:
Does it run faster in asynchronous mode?
It should, just fire off each request in it's own thread.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
baerten wrote:
Does it run faster in asynchronous mode?
It should, just fire off each request in it's own thread.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
Hi everybody, my application (A) opens a port 35000. An external application (B) has the possibility to connect on this port 35000. If the application A is launched 3-times it opens the port 35000, for the second the port 35001 and so far... Now i created a little tool to check which ports are open. a simple loop which increments the Portnumber from 30000 to 30256. But it takes 1 second for each port, so more than 256 seconds for all these possible ports... In the loop i make each time a
new IPEndPoint(...
and
new Socket(....
Does it run faster in asynchronous mode? Big thanks for help :)
Yes it should, since each request fires will not wait the previous one to complete, so multi of them will end up in the same time for example, in the addetion, there are two ways now to use asyncrounous calls with sockets now, the old one Begin/End aspect... and the new one which is introduced in .NET Framework 3.5, which is supposed to be faster and holds better performance ideas as well.
Sincerely Samer Abu Rabie Note: Please remember to rate this post to help others whom reading it.