Board index » delphi » IP sweeping using my client/server app

IP sweeping using my client/server app

In my new client/server applications, i would like my client to be able to
sweep through a range of ip addresses (i.e. 195.43.213.*) and return all the
IP addresses running the server program.
I could get the server to reply to a command to show its running but the
client would have to individually connect to each ip in the range, wait to
see if it connects, then send the command, if the server replys with a valid
command, then add it to the list and go on to the next one, but that would
take ages.
What faster method could i use?

thanks in advance.

 

Re:IP sweeping using my client/server app


Do them all at once (or do about 50 at a time). Create an array of client
sockets, and then set all of their IPs to whatever, and connect away.

Quote
James Riches wrote in message <7fiemk$lo...@uranium.btinternet.com>...
>In my new client/server applications, i would like my client to be able to
>sweep through a range of ip addresses (i.e. 195.43.213.*) and return all
the
>IP addresses running the server program.
>I could get the server to reply to a command to show its running but the
>client would have to individually connect to each ip in the range, wait to
>see if it connects, then send the command, if the server replys with a
valid
>command, then add it to the list and go on to the next one, but that would
>take ages.
>What faster method could i use?

>thanks in advance.

Re:IP sweeping using my client/server app


You could use multiple threads.  I have almost no experience using them (so
I can't really give you a code example), but I know other people have done
this successfully.

--
Richard Alimi
rich...@ralimi.hypermart.net
HTMLSoftware
AOL IM: RichAA31     ICQ#: 17843183
-----------------------------------------------
Want great free software?  Go to HTMLSoftware's
     site at http://ralimi.hypermart.net/

Quote
James Riches <JRic...@BTInternet.com> wrote in message

news:7fiemk$lor$1@uranium.btinternet.com...
Quote
> In my new client/server applications, i would like my client to be able to
> sweep through a range of ip addresses (i.e. 195.43.213.*) and return all
the
> IP addresses running the server program.
> I could get the server to reply to a command to show its running but the
> client would have to individually connect to each ip in the range, wait to
> see if it connects, then send the command, if the server replys with a
valid
> command, then add it to the list and go on to the next one, but that would
> take ages.
> What faster method could i use?

> thanks in advance.

Other Threads