Hi,

I built a network application that do desktop monitoring and many other actions, I'm trying to improve the connection possibility, how the client will find the server, i know that LAN IP address is static in 1st 3 parts 192.168.1.NNN where is NNN is a dynamic part from0 to 255.

I'm trying to build my client to find the server without providing the server IP.
so when client start for the first time it will search for server on port 540 and IP address will be placed in for loop

so the connect method will placed in for loop

for(byte x=0; x<=255; x++)
{
connect(540,"192.168.1." + x);
}

by using this method i will try to connect to my server if server is online its supposed that client find server.

is this a successful method, i need your opinion on this, is there a faster method, the connect method in c# take a while before telling me that connection refused, so searching from 0 to 255 will take time!!!

please help me in this.

Thanks in advanced for your help.