In .NET 7, Microsoft introduced several networking enhancements that address security issues, the HTTP, and APIs.
.NET division of software engineers at Microsoft outlined what they called “the most interesting and impactful changes in the networking field.” The updates reflect Microsoft’s belief, expressed last year by Richard Lander, project manager for the .NET team, that networks are of great importance to modern applications.
“There are also a lot of new developments and diversity of requirements across networking protocols and systems. The networking team focuses on delivering high-performance APIs, primarily for HTTP”,
Richard Lander, Program Manager on the .NET Core team.
HttpHeaders are more thread-safe in .NET 7. With .NET 6, it was easier for users to inadvertently access the headers at the same time, which could lead to the header values being duplicated, malformed or worse.
Header behavior in .NET is more intuitive, with the HttpHeaders matching thread-safety guarantees and concurrently supporting multiple reads – as long as they aren’t modified.
In addition, Microsoft has done more to support Quick UDP Internet Connections (QUIC), a transport layer tool that uses UDP as the underlying protocol and requires the use of TLS 1.3. QUIC.
“Another interesting difference from well-known transport protocols such as TCP and UDP is that it has built-in transport layer stream multiplexing. This allows for multiple concurrent, independent data streams that do not affect each other”,
Microsoft engineers write.
Microsoft brought QUIC into a .NET 5 library for internal use for its implementation of HTTP/3. With .NET 7, Microsoft is making the System.Net.Quic library public and exposing its APIs. The new API can work with such platforms as Linux, macOS, and iOS as well as Windows.
.NET 7 allows IT administrators to see more details about WebSocket protocol response calls. In addition, information about HTTP response headers and status code can contain important information when a handshake success or error occurs, such as details about the handover situation or the tokens associated with the session.