I wrote a "Discovery Service" for adhoc single segment networks that 
uses UPD broadcast.
Every node runs the discovery service. Each nodes sends a "who" message 
on a timer.
When a node recieves a "who" message, it resets it's timer and sends an 
"iam" message.
Thus, only the node with the fastest timer actually sends a "who" 
message. If that node
goes away, then the next fastest node will start sending the "who" 
command. Thus Nodes+1 messages are sent at each timer tick.
Each node stores and ages the "iam" messages. Each node also serves a 
TCP port to allow direct queries of what the node knows. A local client 
can query the "localhost" TCP service to find the services and IP 
address available on the segment.
There are also two utilities provided. One to manually query the 
"localhost" service and another to watch all UPD traffic. I also use 
this utility as a debug message viewer - I embed UDP send trace messages 
in programs I'm debugging.

The service is based on Indy 9.???. There are, I believe, some other 
components used that are available on the web.

The code does not contain any copyright notices, that I remember, so use 
it as you will. It would be nice to know if you do use it.

The code comes in a .zip of the directory that it resides in so it will 
tahe a little work to get it compiled. I use Delphi 7. This version runs 
as a service and contains some remnants of the application version that 
could be removed. The Application version, which has its own builtin 
viewer utility, still exists and could also be made available.

If you want a copy, reply off list and I'll send you a link. If the Indy 
folks would like to use it as "example" code, It would have to be 
converted to Indy 10.

Doug

Reply via email to