- Hands-On Network Programming with C# and .NET Core
- Sean Burns
- 202字
- 2021-06-24 16:05:28
Generating Network Requests in C#
So, now we've got a deep and complete understanding of the nature of networks. We understand the demands that networks place on the design and implementation of the software and hardware that is meant to be deployed on those networks. But what are we supposed to do with this knowledge? In this chapter, we'll finally explore the most common paradigms for leveraging network resources in .NET Core. We'll be looking at the common interface for implementing the request/response transaction model on the internet (the most ubiquitous network with which you'll work), and examine some of the specific implementations of it. Along the way, we'll take a look at what happens under the hood by taking apart some of the source code for the .NET classes that we'll be using.
The following topics will be covered in this chapter:
- The basic structure of the WebRequest class, and what functionality each of its sub-classes is assured to expose through their methods
- How to leverage different sub-classes of the WebRequest class, based on different use cases you may encounter, and understanding the distinct operations that they provide
- The internal phases of request execution as implemented by C#