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 the use of the asynchronous capabilities in the networking classes, which give a Windows Forms application the professional touch of a responsive user interface.




Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

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