Recovering Broken Connections In A Peer to Peer Network
Posted
by peter
on Stack Overflow
See other posts from Stack Overflow
or by peter
Published on 2009-07-08T05:29:57Z
Indexed on
2010/04/01
16:03 UTC
Read the original article
Hit count: 581
Hi All,
I am implementing a peer to peer network using WCF NetPeerTcpBinding connections.
I am using a central server which itself overrides the class CustomPeerResolverService. All this service does is register peers, and publish information about the peers to each other.
On my server application I can visibly see which peers are currently connected on the GUI.
My question is, each peer has a TCP connection to the server. When I unplug my network connection all connections to this server are severed. When the network comes back online those connections to the server are not re-established. What do I need to do to make sure they are re-established?
Here is what each of the peer to peer bindings look like on the peers.
<netPeerTcpBinding>
<binding name="PeerTcpConfig" port="0">
<security mode="None"></security>
<resolver mode="Custom">
<custom address="net.tcp://127.0.0.1/GlobalStoreAPIServer"
binding="netTcpBinding" bindingConfiguration="TcpConfig">
</custom>
</resolver>
</binding>
</netPeerTcpBinding>
So what that means is that my server has an endpoint at 'net.tcp://127.0.0.1/GlobalStoreAPIServer'
© Stack Overflow or respective owner