Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
addaleax commented Mar 24, 2018
Added a regression test for #19562 + a bit more cleanup to make sure |
addaleax commented Mar 24, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
addaleax commented Mar 27, 2018
addaleax commented Mar 27, 2018
Re-building Linux CI: https://ci.nodejs.org/job/node-test-commit-linux/17383/ |
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
addaleax commented Mar 29, 2018
addaleax commented Mar 30, 2018
Landed in abc8786...b7cfd27 |
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]>
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
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]>
targos commented Apr 2, 2018
Should this be backported to |
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]>
Fixes: nodejs#19562 PR-URL: nodejs#19551 Reviewed-By: James M Snell <[email protected]>
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]>
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
Fixes: #19562 PR-URL: #19551 Reviewed-By: James M Snell <[email protected]>
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