Search code examples
windows-store-appsp2pwindows-8.1

Using PeerFinder inside local wired network for P2P communication between Windows 8.1 store apps


Is it possible to use PeerFinder for initiating connection between applications in different PCs inside intranet?

I tried ProximityCS (Windows 8.1) sample and PeerFinder.SupportedDiscoveryTypes returns None for me. (Tested with Windows 8.1 Preview)

I have only found samples to connect using NFC or WifiDirect. Is there any samples of using Infrastructure (TCP/IP) way of connecting?

Is it possible do this manually using Broadcast messages from Windows Store app?


Solution

  • Windows store apps support multicast; from this you can build your discoverability solution. There's a short video how-to about this on the Channel 9 site at http://channel9.msdn.com/posts/Multicast-LAN-Discovery

    To send a multicast message in Windows Runtime, just send it to a multicast address. To receive, you just call JoinMulticastGroup and you can start to receive. To increase your code robustness, re-join when you learn about new networks; this will join the multicast group on newly available adapters.