-
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
Browser WebSocket Improvements #44614
Comments
Tagging subscribers to this area: @dotnet/ncl Issue meta data
|
We should just push it directly to the browser, I don't see any reason to do unnecessary work on the managed side unless it's addressing a bottleneck we found in a profiler. |
No, the issue is just the api mismatch and we can track the write buffers on the browser side rather than in managed for the fragmented send. |
Yeah, looking closer at the spec it appears we should: (edited - corrected some errors in the previous review)
|
cc @kjpou1 |
Looking at it |
So far looking at sample streams of chained blob and an array of write buffers. Have not found a way to control the websocket text or string send type when using the above. It is always sent as binary. WebSocketMessageType
What controls this with fetch is the type of buffer that is passed.
This also controls how we receive data from a websocket using the same criteria. If the fetch body is text then we signify text and a blob or array buffer sent back is read and transferred back to the client as binary. |
I added that distinction to #44666 lets start by getting some tests in place so that we can validate any changes. |
cc @pavelsavara |
WebSocketStream would be nice if it was ready, but it is not. |
Thinking about design for send buffers: when the
|
The current Browser ClientWebSocket implementation is using managed side buffering of partial writes, we should review wether we can push the writes to the browser and chain all the data there for the send call.
The text was updated successfully, but these errors were encountered: