This project is read-only.
Project Description
WCF Peer Resolver is a very extendable and simplified resolver framework to use instead of the built in CurstomPeerResolver in .Net Framework.
It is completely developed in C# with .Net Framework 3.5.

This code is used in production environment as is and is found to be very stable.

//Create a in memory storage manager with cleanup interval of 60s and registration lifetime of 60s
var storage = new InMemoryStorageManager(TimeSpan.FromSeconds(60), TimeSpan.FromSeconds(60));

//Create the resolver using the storage
var resolver = new WcfPeerResolver(storage);

//Create the custom resolver proxy using the resolver
var proxy = new CustomPeerResolverProxy(resolver);

//State a listner uri, this one is listening on localhost with port 80
var uri = new Uri("net.tcp://localhost:8080/CustomResolverResolver");

//Create a service host that hosts the proxy using the defined uri as a singleton
var host = new ServiceHost(proxy, uri);

//Add an endpoint connecting the contract with the proxy and define the binding type.
host.AddServiceEndpoint(typeof(IPeerResolverContract), new NetTcpBinding(SecurityMode.None), uri);

//Start listening for resolver clients

//do something to keep the code alive until you want to exit

//Stop listening for resolver connections.

Feedback is appreciated of user experience!

Best regards,
Tony Fjordén

Last edited Jun 18, 2015 at 9:19 PM by tonyfjorden, version 5