AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Doc HTTP/2 WebSockets support
This is now available for Kestrel in 7.0-preview6. Notes from the blog post:
WebSockets were originally designed for HTTP/1.1 but have since been adapted to work over HTTP/2. Using WebSockets over HTTP/2 lets you take advantage of new features like header compression and multiplexing that reduce the time and resources needed when making multiple requests to the server. That support is now available in Kestrel on all HTTP/2 enabled platforms. The version negotiation is automatic in browsers and Kestrel so no new APIs are needed, you can follow the existing samples. Note HTTP/2 WebSockets use CONNECT requests rather than GET, so your routes and controllers may need updating. Chrome and Edge have HTTP/2 WebSockets enabled by default and you can enable it in FireFox on the about:config page with the network.http.spdy.websockets flag. SignalR server and the browser JavaScript client also support it. Support is coming to ClientWebSocket and YARP soon.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: a3b0cac1-adc7-434c-d867-6e28e39bdae7
- Version Independent ID: 762efeed-010e-f422-03d0-22d6681b2851
- Content: WebSockets support in ASP.NET Core
- Content Source: aspnetcore/fundamentals/websockets.md
- Product: aspnet-core
- Technology: aspnetcore-fundamentals
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande