-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse ManagedWebSocket for websocket connections on Windows HttpListener. #19367
Comments
@Priya91 is it netstandard2.0? |
@karelz Need to understand the change, @stephentoub can elaborate.. |
It's an implementation detail to avoid having multiple competing copies of a fairly large swath of code, and using the one that's already had performance work done on it, rather than the one that was just ported over as part of HttpListener as part of netstandard2.0 work. But it's not stricly necessary in order to ship. |
Instead of compiling the code in HttpListener, we should instead move the protocol implementation into System.Net.WebSockets. Here's the proposed plan:
/cc: @stephentoub @karelz @anurse |
Note the managed implementation won't work on Win7 HttpListener, Http.Sys doesn't support the necessary upgrade. You're probably better off leaving the Windows HttpListener WebSocket code alone. It was extensively tested and tuned when it was written. |
Maintaining multiple implementations brings non-trivial cost. Maybe we should keep it just for Win7 (which will eventually go out of support) and replace Win8+ implementation with the managed one? |
? There is no Win7 implementation. |
Yes, there is a "Win 7" implementation. @stephentoub wrote a new managed websocket implementation that works right now on *Nix. But the plan is to just use that code for the Win7 binary in the NuGet package. |
There's no Win7 HttpListener implementation. |
ok...you're right. This is discussing server-side websocket. But the plan is to implement HttpListener using Mono code (which doesn't use http.sys) and re-use that for Win7. Basically, the plan is to just have a sockets server that understands enough HTTP to get to the point of becoming a WebSocket. |
Wait, .NET Core HttpListener isn't going to use Http.Sys on Windows? |
No. That stays the same. But to implement WebSocket server-side on Win7, it will use an http stack other than http.sys. |
Related to #17644 |
/cc @davidsh @DavidGoll @Caesar1995
|
Triage: While nice to have, there is not clear customer value. There may be some maintenance value long-term, but given we don't touch the code base often, we can close it now. |
Refer comment here
cc @stephentoub
The text was updated successfully, but these errors were encountered: