Chapter 9. Networking
The FCL includes a number of types that make accessing networked resources easy. Offering different levels of abstraction, these types allow an application to ignore much of the detail normally required to access networked resources while retaining a high degree of control.
This chapter describes the core networking support in the FCL, and
provides numerous examples leveraging the predefined classes. The
types mentioned in this section all exist in the
System.Net
and
System.Net.Sockets
namespaces.
Network Programming Models
High-level access is performed using a set of types that implement a generic request/response architecture, which is extensible, to support new protocols. The implementation of this architecture in the FCL also includes HTTP-specific extensions to make interacting with web servers easy.
Should the application require lower-level access to the network, types exist to support the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Finally, in situations in which direct transport-level access is required, there are types that provide raw socket access.
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.