-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Rewrite WebSocketWriter to use StreamWriter #2837
Comments
|
I think everything that would still make sense to do with the current codebase is done. There isn't anything to be gained by making We could probably simplify the writer some more by removing |
ping and pong are details that are implemented in ``ClientWebSocketResponse`` and ``WebSocketResponse``. Keep the writer clean by limiting it to sending frames and closing closes #2837
Also limit is used downstream so we don't want to drop that. Right now it has to be set via a protected method. Let me also look into exposing that to close up that downstream |
Now websocket writer has custom flow control.
It's maybe not bad but overcomplicates things.
Since #2836 is done websocket writer uses coroutines everywhere, the transition should be smooth.
No Public API changes but
limit=DEFAUTLT_LIMIT
andMSG_SIZE
will be dropped.I see related micro-optimizations made by @fafhrd91 and @pfreixes but I believe the performance impact will be negligible.
Talking about performance using bytearray as websocket message structure and adding Cython optimization for parsing/building websocket header can get better speed boost.
The text was updated successfully, but these errors were encountered: