dcsimg
Scan IP numbers to find one listening server on a determinate port
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, June 14, 2002 05:32 PM

I have just create with Socket and Thread a process that scan IP numbers fro xxx.xxx.xxx.1 to xxx.xxx.xxx.255 and try to connect to port 1500 for every IP numbers to find a listening server. This works but is very slow . What can I do to speed the process and find the server ? Can you show me by example how can I do ? Thanks

Re: Scan IP numbers to find one listening server on a determinate port

Posted By:   Martin_Kernland  
Posted On:   Tuesday, June 18, 2002 12:35 AM

Hi

You already sent this question a few days ago....

Your code was hard to read (no formatting! :-(.

Two things you could "optimize":

  • use multiple threads (you could even create 255 threads :-) and each thread tries to connect.

  • why do you have a Thread.sleep(2500);? No wonder it is slow...


HTH

Martin
About | Sitemap | Contact