Chapter 3. Understanding the New Networking Capabilities

In this chapter, we will cover how to use the HttpClient and new System.Net.Http namespaces.

Introduction

.NET 4.5 brings improved capabilities in networking such as more support for internationalization, protocol improvements, better performance, and new programming interfaces for HTTP and WebSockets. The main improvement is that it now fully supports WebSockets and the complete HTTP standard.

.NET Framework 4.5 enhances internationalization with the following features

  • Internationalized Domain Name (IDN) support
  • E-mail Address Internationalization (EAI) support
  • International Uniform Resource Identifier (URI) support, compliant with the latest RFCs from the Internet Engineering Task Force (IETF)

Regarding protocol support, the additions are:

  • Better IPv6 support
  • Improved Sockets protocol support with a dual-mode socket support

As for new namespaces, we now have System.Net.Http, System.Net.Http.Headers, and System.Net.WebSockets namespaces. We have improvements on classes such as HttpListener, Uri, Socket, and on namespaces such as System.Net.Mail or System.Net.NetworkInformation.

We will now explore in practice some of these features to get a solid grasp on the new capabilities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset