因此,我试图从总体上理解 WCF,尤其是这个MSDN 聊天客户端示例。我一直在测试下面的配置,它似乎工作正常。但是,如果 Internet 连接丢失(或不存在)会怎样?同行还能找到彼此吗?(根据这个问题,我会问“路由信息的云,它协同回答”。这种情况下的“云”是否仅限于我的局域网?)
<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>
提前感谢您的帮助!