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
net: add ability to reset a tcp socket #43112
Closed
Closed
Conversation
This file contains 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
make it possible to forcibly rest a tcp socket: * add a new method `Socket.prototype.resetAndDestroy` * add a new flag `resetAndClosing` to make `_destroy` calls the `reset` instead of close while destroying a Socket. * add new methods `TCPWrap::Reset` to be a wrap of `uv_tcp_close_reset` * change `HandleWrap::state_` from private to protected. This is essential for keeping the same behaviour between `TCPWrap::Reset` and `HandleWrap::Close` Fixes: nodejs#27428
|
Review requested: |
|
So far the approach LGTM! Good job! |
|
Will start reviewing after adding some test cases, referencing those test cases related |
make it possible to forcibly rest a tcp socket: * add a new method `Socket.prototype.resetAndDestroy` * add a new flag `resetAndClosing` to make `_destroy` calls the `reset` instead of close while destroying a Socket. * add new methods `TCPWrap::Reset` to be a wrap of `uv_tcp_close_reset` * change `HandleWrap::state_` from private to protected. This is essential for keeping the same behaviour between `TCPWrap::Reset` and `HandleWrap::Close` Fixes: nodejs#27428
make it possible to forcibly rest a tcp socket: * add a new method `Socket.prototype.resetAndDestroy` * add a new flag `resetAndClosing` to make `_destroy` calls the `reset` instead of close while destroying a Socket. * add new methods `TCPWrap::Reset` to be a wrap of `uv_tcp_close_reset` * change `HandleWrap::state_` from private to protected. This is essential for keeping the same behaviour between `TCPWrap::Reset` and `HandleWrap::Close` Fixes: nodejs#27428
make it possible to forcibly rest a tcp socket: * add a new method `Socket.prototype.resetAndDestroy` * add a new flag `resetAndClosing` to make `_destroy` calls the `reset` instead of close while destroying a Socket. * add new methods `TCPWrap::Reset` to be a wrap of `uv_tcp_close_reset` * change `HandleWrap::state_` from private to protected. This is essential for keeping the same behaviour between `TCPWrap::Reset` and `HandleWrap::Close` Fixes: nodejs#27428
make it possible to forcibly rest a tcp socket: * add a new method `Socket.prototype.resetAndDestroy` * add a new flag `resetAndClosing` to make `_destroy` calls the `reset` instead of close while destroying a Socket. * add new methods `TCPWrap::Reset` to be a wrap of `uv_tcp_close_reset` * change `HandleWrap::state_` from private to protected. This is essential for keeping the same behaviour between `TCPWrap::Reset` and `HandleWrap::Close` Fixes: nodejs#27428
JungMinu
approved these changes
May 20, 2022
|
48hrs+ PR's ready to go. :D |
|
Yes, I'm taking care of the CI and then I'll land this. |
20 tasks
|
Landed in 360cda1 |
20 tasks
19 tasks
19 tasks
19 tasks
18 tasks
18 tasks
bengl
added a commit
that referenced
this issue
May 31, 2022
Notable changes: * deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197 * (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * deps: upgrade npm to 8.11.0 (npm team) #43210 * deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067 * (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740 * (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112 PR-URL: TBD
bengl
added a commit
that referenced
this issue
May 31, 2022
Notable changes: * deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197 * (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * deps: upgrade npm to 8.11.0 (npm team) #43210 * deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067 * (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740 * (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112 PR-URL: #43266
bengl
added a commit
that referenced
this issue
Jun 1, 2022
Notable changes: * deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197 * (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * deps: upgrade npm to 8.11.0 (npm team) #43210 * deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067 * (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740 * (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112 * (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740) * This means 32-bit Windows binaries are back with this release. PR-URL: #43266
bengl
added a commit
that referenced
this issue
Jun 1, 2022
Notable changes: * deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197 * (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * deps: upgrade npm to 8.11.0 (npm team) #43210 * deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067 * (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740 * (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112 * (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740) * This means 32-bit Windows binaries are back with this release. PR-URL: #43266
bengl
added a commit
that referenced
this issue
Jun 1, 2022
Notable changes: * deps: update undici to 5.4.0 (Node.js GitHub Bot) #43262 * (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * deps: upgrade npm to 8.11.0 (npm team) #43210 * deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067 * (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740 * (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601 * (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397 * (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112 * (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740) * This means 32-bit Windows binaries are back with this release. PR-URL: #43266
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c++
Issues and PRs that require attention from people who are familiar with C++.
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
semver-minor
PRs that contain new features and should be released in the next minor version.
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.
make it possible to forcibly rest a tcp socket:
add a new method
Socket.prototype.resetAndDestroyadd a new private method
Socket.prototype._resetadd a new flag
resetAndClosingto make_destroycallsthe
_resetinstead of close while destroying a Socket.add new methods
TCPWrap::Resetto be a wrap ofuv_tcp_close_resetchange
HandleWrap::state_from private to protected.This is essential for keeping the same behaviour between
TCPWrap::ResetandHandleWrap::Closeadd test cases for the new method
Fixes: #27428