websocketoverhttp: support keeping back data until more arrives#48185
Merged
websocketoverhttp: support keeping back data until more arrives#48185
Conversation
6629e18 to
7762971
Compare
7762971 to
df7970c
Compare
mhp
approved these changes
Apr 1, 2025
Contributor
mhp
left a comment
There was a problem hiding this comment.
I checked the various bits of bookkeeping and it looked right to me. How easy is it to add a couple of test cases, to make sure this continues to work?
Member
Author
|
Tests for these changes won't be easy since they'll need to be async against a fake backend and we don't have any such tests like that for this class yet, but this is a good occasion to remedy that. Thanks for approving. I'll land and figure out how to add tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #48187. Basically, instead of calling
removeContentFromFrames()before sending the exported events to the backend, it is called after receiving the response from the backend, and instead of removing all exported content only the amount accepted is removed.Notes:
CLOSEmessage, since there won't be any data after it to wait for. If Pushpin sends a request containing aCLOSE, the backend must accept all of the content in the request or the session will be terminated.Keep-Alive-Intervalor publishing arefreshaction will cause the buffer to be replayed.Content-Bytes-Replayedheader in the request. The backend can use this to confirm whether the use ofContent-Bytes-Acceptedworked.