What’s In This Chapter?
Wrox.com Code Downloads for This Chapter
The wrox.com code downloads for this chapter are found at http://www.wrox.com/go/professionalcsharp6 on the Download Code tab. The code for this chapter is divided into the following major examples:
This chapter takes a fairly practical approach to networking, mixing examples with a discussion of relevant theory and networking concepts as appropriate. This chapter is not a guide to computer networking but an introduction to using the .NET Framework for network communication.
This chapter shows you how to create both clients and servers using network protocols. It starts with the simplest case: sending an HTTP request to a server and storing the information that’s sent back in the response.
Then you see how to create an HTTP server, using utility classes to split up and create URIs and resolve hostnames to IP addresses. You are also introduced to sending and receiving data via TCP and UDP and find out how to make use of the Socket class.
The two namespaces of most interest for networking are System.Net and System.Net.Sockets. The System.Net namespace is generally concerned ...