O'Reilly logo

Professional C# 2012 and .NET 4.5 by Morgan Skinner, Karli Watson, Jay Glynn, Bill Evjen, Christian Nagel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 26

Networking

WHAT’S IN THIS CHAPTER?

  • Downloading files from the web
  • Using the WebBrowser control in a Windows Forms application
  • Manipulating IP addresses and performing DNS lookups
  • Socket programming with TCP, UDP, and socket classes

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at http://www.wrox.com/remtitle.cgi?isbn=1118314425 on the Download Code tab. The code for this chapter is divided into the following major examples:

  • BasicWebClient
  • Browser
  • DnsLookup
  • SocketClient
  • SocketServer
  • TcpSend
  • TcpReceive
  • ViewHeaders
  • WebSocketSample

NETWORKING

This chapter takes a fairly practical approach to networking, mixing examples with a discussion of the 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.

You will learn how to use the WebBrowser control in a Windows Forms environment, and why it can make some specific Internet access tasks easier to accomplish. However, the chapter starts with the simplest case: sending a request to a server and storing the information sent back in the response.

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required