Summary


In this chapter, you reviewed the .NET Framework classes available in the System.Net namespace for communication across networks. You have seen some of the .NET base classes that deal with opening client connections on the network and Internet, and how to send requests to and receive responses from servers (the most obvious use of this being to receive HTML pages). By taking advantage of the new WebBrowser control in .NET 2.0, you can easily make use of Internet Explorer from your desktop applications.

As a rule of thumb, when programming with classes in the System.Net namespace, you should always try to use the most generic class possible. For instance, using the TCPClient class instead of the Socket class isolates your code from many of the lower-level socket details. Moving one step higher, the WebRequest class allows you to take advantage of the pluggable protocol architecture of the .NET Framework. Your code will be ready to take advantage of new application-level protocols as Microsoft and other third-party developers introduce new functionality.

Finally, you learned how to use the asynchronous capabilities in the networking classes, which give a Windows Forms application the professional touch of a responsive user interface.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net