Using duplex communication with the WCF net.tcp binding

So far, we have looked at two technologies that allow us to perform duplex communication. In the previous chapter, we looked at how we could set this up using TCP sockets communication. The biggest advantage of using sockets is their speed. The second option is duplex WCF services, which is the focus of the previous recipe. Being WCF services, the programming model is much simpler. Based on contracts, we get typed access to the objects with which we're working. However, they rely on HTTP for their communication, resulting in slower speeds.

Silverlight 4 has added a new option that brings the best of both worlds—WCF net.tcp binding. We can still use the same simple programming model from WCF ...

Get Silverlight 4 Data and Services Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.