| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631
| 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; |
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?
Sorry, something went wrong.
There was a problem hiding this comment.
I’d guess it’s good enough, yes :)
Sorry, something went wrong.
| 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.
Nit:
| ### http2stream.bufferSize | |
| #### http2stream.bufferSize |
Sorry, something went wrong.
| [`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 |
There was a problem hiding this comment.
Nit: should go after [`net.Socket`]: net.html#net_class_net_socket (in ASCII sort order).
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks! Done.
Sorry, something went wrong.
Sorry, something went wrong.
|
The test, parallel/test-tls-alert-handling, failed seems unrelated. |
Sorry, something went wrong.
Sorry, something went wrong.
This commit adds `bufferSize` for `Http2Stream`. Refs: nodejs#21631 PR-URL: nodejs#23711 Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
This commit adds bufferSize for Http2Stream.
Refs: #21631
/cc @jasnell @addaleax @apapirovski
From the code, I believe the writeQueueSize in http2 module could represent the kLastWriteQueueSize in 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.bufferSize basing on this which is what #21631 exactly requested.
Checklist