开发者

Does PNRP work on a LAN with no Internet connection?

So, I'm trying to make sense of WCF in general, and this MSDN ch开发者_运维知识库at 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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜