In this chapter, you learned how to use classes from the System.Net and System.Net.Sockets name- spaces to create networking applications. You read how the WebClient class can be used to access Web servers. The simple FTP client you created illustrated how to use the FtpWebRequest and FtpWebResponse classes, which provide more control than the WebClient class. You also saw that, in addition to the FtpWebRequest class, the HttpWebRequest and FileWebRequest classes can be used.
This chapter showed that, because writing a server is not possible with the FtpWebRequest and FtpWebResponse classes, you need classes from the System.Net.Sockets namespace instead. You also learned how to create a TCP server with the TcpListener class and a client application with the TcpClient class.
In this chapter, you learned:
How to use the Dns class for name lookups
What the client sends with a HTTP request
How to do HTTP requests with the WebClient class
How to work with the WebRequest class, particularly how to get files from an FTP server with the FtpWebRequest class
How to use a custom protocol with classes from the namespace System.Net.Sockets