Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: Searching network for server
| Subject: | Re: Searching network for server |
| Posted by: | "Francois Piette [ICS & Midware]" (francois.piet..@overbyte.be) |
| Date: | Thu, 3 Aug 2006 08:45:00 |
> I'm writing client software and I would like to
> implement mechanism for searching network for server.
> Server is special device connected directly to LAN
> and for communication is using port 2001.
> Does anyone know how to do that?
If you have control over server software, it is better to make it either
advertize itself on the LAN by broadcasting a packet every minute or so, or
having the server listen on a UDP port to which client would broadcast their
request to know where the server is. The server reply to the broadcast with
informations about itself.
If server can't collaborate, it is not easy to find it whithout using brute
force: try to connect to the server port on every IP address in the LAN.
This could be quite slow when large address range is used !
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html