15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

summary ❘ 1355<br />

}<br />

}<br />

DisplayString = "No peers found."<br />

});<br />

As you can see from this example, interacting with the PNM service is made very simple by the classes you<br />

have learned about.<br />

summary<br />

This chapter demonstrated how to implement peer-to-peer functionality in your applications by using the<br />

P2P classes in .<strong>NET</strong> 4.<br />

You have looked at the types of solutions that P2P makes possible <strong>and</strong> how these solutions are structured,<br />

how to use PNRP <strong>and</strong> PNM, <strong>and</strong> how to use the types in the System.Net.PeerToPeer <strong>and</strong> System.Net<br />

.PeerToPeer.Collaboration namespaces. You also saw the extremely useful technique of exposing<br />

WCF services as P2P endpoints.<br />

If you are interested in developing P2P applications, it is well worth investigating PNM further. It is also<br />

worth looking at the peer channel, by which WCF services can broadcast communications among multiple<br />

clients simultaneously.<br />

In the next chapter you look at Message Queuing.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!