Closed
Conversation
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631
f2264e6 to
d7d9307
Compare
jasnell
reviewed
Oct 17, 2018
| get bufferSize() { | ||
| // `bufferSize` properties of `net.Socket` are `undefined` when | ||
| // their `_handle` are falsy. Here we avoid the behavior. | ||
| return this[kState].writeQueueSize + this.writableLength; |
Member
There was a problem hiding this comment.
At best this is likely an approximation with a high degree of accuracy at any given time. It's likely good enough :-)
What do you think @addaleax?
Member
There was a problem hiding this comment.
I’d guess it’s good enough, yes :)
doc/api/http2.md
Outdated
| Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, | ||
| the `'aborted'` event will have been emitted. | ||
|
|
||
| ### http2stream.bufferSize |
Contributor
There was a problem hiding this comment.
Nit:
Suggested change
| ### http2stream.bufferSize | |
| #### http2stream.bufferSize |
doc/api/http2.md
Outdated
| [`net.Socket.prototype.ref()`]: net.html#net_socket_ref | ||
| [`net.Socket.prototype.unref()`]: net.html#net_socket_unref | ||
| [`net.connect()`]: net.html#net_net_connect | ||
| [`net.Socket.bufferSize`]: net.html#net_socket_buffersize |
Contributor
There was a problem hiding this comment.
Nit: should go after [`net.Socket`]: net.html#net_class_net_socket (in ASCII sort order).
Member
Contributor
Author
|
The test, parallel/test-tls-alert-handling, failed seems unrelated. |
Member
jasnell
approved these changes
Oct 24, 2018
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Nov 6, 2018
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631 PR-URL: nodejs#23711 Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
Landed in 33fbb93 |
This was referenced Nov 15, 2018
Merged
This was referenced May 29, 2019
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.
This commit adds
bufferSizeforHttp2Stream.Refs: #21631
/cc @jasnell @addaleax @apapirovski
From the code, I believe the
writeQueueSizein http2 module could represent thekLastWriteQueueSizein net module:node/lib/net.js
Line 518 in deaddd2
and the tests following this PR seems okay. Can you help to confirm that?
BTW, we can add
Http2Session.bufferSizebasing on this which is what #21631 exactly requested.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes