WHAT'S IN THIS CHAPTER?
Using WebClient to call for remote content
Dealing with cross-domain access
Using WCF duplex communications with Silverlight
Working with sockets
Because Silverlight applications are on the client side, this chapter focuses on the communication capabilities these types of applications provide. This chapter is not a guide to computer networking, but an introduction to using the .NET Framework along with Silverlight for network communication.
This chapter covers facilities provided through the .NET base classes for using various network protocols, particularly HTTP and TCP, to access networks and the Internet as a client. It covers some of the lower-level means of getting at these protocols through the .NET Framework. You will also find other means of communicating via these items using technologies such as the Windows Communication Foundation (WCF) or using REST-based services to get at remote capabilities. The two namespaces of most interest for networking are
System.Net namespace is generally concerned with higher-level operations, for example, downloading and uploading files, and making web requests using HTTP and other protocols, whereas
System.Net.Sockets contains classes to perform lower-level operations. You will find these classes useful when you want to work directly with sockets or protocols, such as TCP/IP. The methods in these classes closely mimic the Windows Socket (Winsock) ...