-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
net: track bytesWritten in C++ land #19551
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
Closed
Closed
Conversation
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
This was referenced Mar 24, 2018
Member
Author
|
Added a regression test for #19562 + a bit more cleanup to make sure |
Member
Author
Member
Author
|
/cc @jasnell @apapirovski |
jasnell
approved these changes
Mar 27, 2018
Member
Author
Move tracking of `socket.bytesWritten` to C++ land. This makes it easier to provide this functionality for all `StreamBase` instances, and in particular should keep working when they have been 'consumed' in C++ in some way (e.g. for the network sockets that are underlying to TLS or HTTP2 streams). Also, this parallels `socket.bytesRead` a lot more now.
Simply always tell the caller how many bytes were written, rather than letting them track it. In the case of writing a string, also keep track of the bytes written by the earlier `DoTryWrite()`. Refs: nodejs#19562
Member
Author
Member
Author
|
Landed in abc8786...b7cfd27 |
addaleax
added a commit
that referenced
this pull request
Mar 30, 2018
Move tracking of `socket.bytesWritten` to C++ land. This makes it easier to provide this functionality for all `StreamBase` instances, and in particular should keep working when they have been 'consumed' in C++ in some way (e.g. for the network sockets that are underlying to TLS or HTTP2 streams). Also, this parallels `socket.bytesRead` a lot more now. PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
addaleax
added a commit
that referenced
this pull request
Mar 30, 2018
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
addaleax
added a commit
that referenced
this pull request
Mar 30, 2018
Simply always tell the caller how many bytes were written, rather than letting them track it. In the case of writing a string, also keep track of the bytes written by the earlier `DoTryWrite()`. Refs: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
2 tasks
Member
|
Should this be backported to |
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
May 1, 2018
Move tracking of `socket.bytesWritten` to C++ land. This makes it easier to provide this functionality for all `StreamBase` instances, and in particular should keep working when they have been 'consumed' in C++ in some way (e.g. for the network sockets that are underlying to TLS or HTTP2 streams). Also, this parallels `socket.bytesRead` a lot more now. PR-URL: nodejs#19551 Reviewed-By: James M Snell <[email protected]>
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
May 1, 2018
Fixes: nodejs#19562 PR-URL: nodejs#19551 Reviewed-By: James M Snell <[email protected]>
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
May 1, 2018
Simply always tell the caller how many bytes were written, rather than letting them track it. In the case of writing a string, also keep track of the bytes written by the earlier `DoTryWrite()`. Refs: nodejs#19562 PR-URL: nodejs#19551 Reviewed-By: James M Snell <[email protected]>
addaleax
added a commit
that referenced
this pull request
Jun 29, 2018
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
Merged
rvagg
pushed a commit
that referenced
this pull request
Aug 16, 2018
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
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.
Move tracking of
socket.bytesWrittento C++ land.This makes it easier to provide this functionality for all
StreamBaseinstances, and in particular should keep workingwhen they have been 'consumed' in C++ in some way (e.g. for
the network sockets that are underlying to TLS or HTTP2 streams).
Also, this parallels
socket.bytesReada lot more now.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes