Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
http2: add Http2Stream.bufferSize#23711
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
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631
f2264e6 to d7d9307Compare| getbufferSize(){ | ||
| // `bufferSize` properties of `net.Socket` are `undefined` when | ||
| // their `_handle` are falsy. Here we avoid the behavior. | ||
| returnthis[kState].writeQueueSize+this.writableLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
| ### 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 |
vsemozhetbytOct 17, 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should go after [`net.Socket`]: net.html#net_class_net_socket (in ASCII sort order).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.
BridgeAR commented Oct 19, 2018
oyyd commented Oct 20, 2018
The test, parallel/test-tls-alert-handling, failed seems unrelated. |
lundibundi commented Oct 20, 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.
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631 PR-URL: nodejs#23711 Reviewed-By: James M Snell <[email protected]>
Trott commented Nov 6, 2018
Landed in 33fbb93 |
This commit adds `bufferSize` for `Http2Stream`. Refs: #21631 PR-URL: #23711 Reviewed-By: James M Snell <[email protected]>
This commit adds `bufferSize` for `Http2Stream`. Refs: #21631 PR-URL: #23711 Reviewed-By: James M Snell <[email protected]>
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