Condividi tramite


How/where to get the Peer channel samples?

We ship a total of 6 samples with the Windows SDK, that are included in the WindowsCommunicationFoundation samples zipped file.

Download locations:

1. RTM Runtime: https://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en

2. RTM Windows SDK: https://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en

On MSDN:

1. Sample documentation for WCF: https://msdn2.microsoft.com/en-us/library/ms735119.aspx

2. Peer channel sample + documentation on msdn:

The entire list of samples maybe found here: https://msdn2.microsoft.com/en-us/library/ms752266.aspx 

Shortcut links to hte individual samples themselves is as under:

(a) Basic Binding samples - Use the Pnrp resolver mode- https://msdn2.microsoft.com/en-us/library/ms735119.aspx

  b) Scenario sample -

       (i) Chat - Demonstrates Chat using the non-PNRP custom resolver - https://msdn2.microsoft.com/en-us/library/ms751502.aspx

       (ii) Custom Resolver (Advanced users) - Demonstrates how to write your own Custom Resolver service and client (instead of using the Pnrp resolver OR the non-Pnrp default resolver service/client that we ship with already). - https://msdn2.microsoft.com/en-us/library/ms751466.aspx 

Enjoy!

-Shalini.

Comments

  • Anonymous
    May 18, 2007
    The MSDN samples contains an implementation of a custom peer resolver. There is also a default CustomPeerResolver that is available is WCF. What are the differences? I see that RefreshInterval and Cleanup are not available in the MSDN implementation.

  • Anonymous
    May 18, 2007
    Hi Madhu, The custom implementation sample of hte peer resolver essentially is a very basic version of what a non-PNRP name resolver could look like. It is just one approach to guide you if you were to design your own resolver implementation. Like you noticed, the default implementation of a non-PNRP based name resolver that we ship with (also on msdn), is more robust, and tested and we advise that customers use this as an alternative to PNRP mode. I will be writing more on how to implement your own custom resolver that extends the default implementation we ship with as well.. Hope that helps. -Shalini.

  • Anonymous
    May 19, 2007
    Shalini Thank you for your prompt response. Currently, we are using an application that uses a slightly modified version of the Custom PeerResolver sample - we are not able to use PNRP for name resolution due to the network requirements. We have had a lot of problems which are most likely due to stale peer registrations and due to the fact that we do not handle periodic PeerNode refresh and cleanup. I think implementing a custom resolver that extends the default implementation will fix a large part of our issues. Look forward to your posts regarding  this - in the meantime, I will investigate the default custom resolver in more detail. A sample Service application that we replaces the MSDN example with one using an extension of the default resolver will be helpful as a starting point.

  • Anonymous
    May 23, 2007
    Shalini When using CustomPeerResolver, the client has to refresh within the bounds set by the RefreshInterval at the server. How about when using Pnrp. Do clients need to periodically update their presence? How does the Pnrp server handle crashed clients? Please consider writing about the differences we may expect in implementation between Pnrp and CustomResolver - thanks!

  • Anonymous
    June 20, 2007
    Hi Madhu, Sorry for the delayed response. To answer your question, when using PNRP, the clients need not be bothered by requiring to refresh their registrations with the PNRP service. As long as your Peer channel is running, your registration will stay active with all usable PNRP clouds (For more information on PNRP refer to http://blogs.msdn.com/p2p). If a client crashes, then it's registration will automatically be removed from the PNRP cache. Hope this helps.. Shalini.

  • Anonymous
    June 20, 2007
    Madhu, Here is the promised post on extending teh default CustomPeerResolverService.cs class: http://blogs.msdn.com/peerchan/archive/2007/06/20/extending-the-defaultpeercustomresolver.aspx Hope it helps! Thanks, Shalini.