tags:

views:

27

answers:

3

How would I write a program in such a way that it could discover other instances of itself on the network and let those instances "peer" with each other?

I'm mainly looking for protocols that would allow me to do this (and, hopefully, not put too much stress on the network).

+2  A: 

Within a network (=same subnet) you can use broadcasts to communicate. Although you can't be sure that a broadcast reaches it destination (due to firewall protections against them).

tanascius
+1  A: 

Send occasional packets using a network broadcast address.

mcandre
+3  A: 

I would suggest to use "Bonjour" protocol, which is itself based on DNS broadcast if i remember well. While Apple originated, i think specs & base implementation libraries should be available on several OSes/Languages

dweeves
"Avahi" is one free implementation.
caf