>what i have tried is just to loop from 10.20.30.x to 10.20.30.y and try
connecting
using the connect call. it take a horrible amount of time before it can
connect, because each connect call takes a lot of time to time out if it
cannot connect.i wanted to know if there was any faster way i could do that ? ? ?
Learn about non blocking sockets. Then open a non-blocking connect to
each computer in the range and select() on the socket descriptor to see
which one accepts your connection.
HTH
Stuart