I was recently toying with the P2P samples in the Longhorn SDK, trying out the Peer Name Resolution Protocol (PNRP) protocol. The whole P2P stack in Longhorn, under the System.Net.PeerToPeer namespace, is an evolution of the work done with Peer To Peer networking for Windows XP (more information on that can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/p2psdk/p2p/what_is_peer-to-peer_networking_.asp?frame=true).
There are some great samples in the SDK. I would recommend checking out the PNRP Registration and PNRP Resolver for starters, to get the hang of what is going on. However, be aware that if you are using a single machine to run both samples, the Resolver will not resolve your own machine’s PNRP address if the “Maximum Results” counter is set to greater than 1. By default, the sample sets it to 999 and, if you run the sample having registered a name with the other sample, you will time out. But, if you set the “Maximum Results” to 1, you will find yourself.
Finding yourself is always a good thing.