|
-
May 13th, 2007, 01:50 PM
#1
Thread Starter
Lively Member
Searching for server among my LAN
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.
.........................................................
John F. Gouda {A.K.A}{Dominator Legend}
Software Engineer
+20-0125113313
.......................................................
Please feel free to download my projects:
Http://DominatorLegend.Co.Nr
.................................................................................................... ................................................................................................
Direct Library | Speech Library | System Locker V.3 | Magic Encryptor | And many many more, follow the link above...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|