From 2eea1424f13c6de196cdc1c563c792a2d93a94ca Mon Sep 17 00:00:00 2001 From: Karim Salem Date: Fri, 13 Mar 2026 15:16:27 -0700 Subject: [PATCH] Document kernel-level response buffering in HttpListener Added information about kernel-level response buffering support in HttpListener starting from .NET 11. --- .../runtime-libraries/system-net-httplistener.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/fundamentals/runtime-libraries/system-net-httplistener.md b/docs/fundamentals/runtime-libraries/system-net-httplistener.md index 603770fab1b32..070f256599d68 100644 --- a/docs/fundamentals/runtime-libraries/system-net-httplistener.md +++ b/docs/fundamentals/runtime-libraries/system-net-httplistener.md @@ -44,3 +44,9 @@ An can require client authentication. You can eit The class is built on top of `HTTP.sys`, which is the kernel mode listener that handles all HTTP traffic for Windows. `HTTP.sys` provides connection management, bandwidth throttling, and web server logging. Use the [HttpCfg.exe](/windows/win32/http/httpcfg-exe) tool to add SSL certificates. + +Starting in .NET 11, the Windows `HTTP.sys` implementation of supports enabling kernel-level response buffering. When enabled, response data is buffered by `HTTP.sys` before being sent to the client, which can improve throughput for high-latency connections. This can be enabled by calling the method as follows: + + ```csharp + AppContext.SetSwitch("System.Net.HttpListener.EnableKernelResponseBuffering", true); + ```