Question

So, I'm trying to make sense of WCF in general, and this MSDN chat client sample in particular. I have been testing with the configuration below, and it seems to be working fine. However, what will happen if the Internet connection is lost (or nonexistent)? Will the peers still be able to find each other? (According to this question, I will be asking "the cloud for routing information, and it collaboratively answers". Would the "cloud" in this case be confined to my LAN?)

<client>
    <!-- chat instance participating in the mesh -->
    <endpoint name="ChatEndpoint"
            address="net.p2p://chatMesh/ServiceModelSamples/Chat"
            binding="netPeerTcpBinding"
            bindingConfiguration="BindingDefault"
            contract="Microsoft.ServiceModel.Samples.IChat">
    </endpoint>
 </client>


<bindings>
  <netPeerTcpBinding>
    <!-- Refer to Peer channel security samples on how to configure netPeerTcpBinding for security --> 
      <binding name="BindingDefault" port="0">
      <security mode="None"/>
      <resolver mode="Auto"/>
    </binding>
  </netPeerTcpBinding>
</bindings>

Thanks in advance for any help!

Was it helpful?

Solution

Locally they use SSDP to find peers that are on the same subnet. This will allow peers to find each other even with no internet connection.

Alternatively, you can implement your own "Peer Resolver" that will act as a registration server. If you need a sample of that please post a comment and I'll dig up my sample code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top