Uh oh!
There was an error while loading. Please reload this page.
http2: window size connection control - #26962
Conversation
Allow to control the connection window size by setting local window size (local endpoints's window size) to the given window_size. To increase window size, this function may submit WINDOW_UPDATE frame to transmission queue. Pay attention, this function takes the absolute value of window size to set, rather than the delta, the delta is computed by the update operation.
BridgeAR
commented
Apr 3, 2019
@nodejs/http2 PTAL |
nodejs-github-bot
commented
Apr 3, 2019
| | `0x0b` | Enhance Your Calm | `http2.constants.NGHTTP2_ENHANCE_YOUR_CALM` | | ||
| | `0x0c` | Inadequate Security | `http2.constants.NGHTTP2_INADEQUATE_SECURITY` | | ||
| | `0x0d` | HTTP/1.1 Required | `http2.constants.NGHTTP2_HTTP_1_1_REQUIRED` | | ||
| | `0x0d` | HTTP/1.1 Required | `http2.constants.NGHTTP2_HTTP_1_1_REQUIRED` | |
| than the delta. | ||
| ```js | ||
| clientSession.on('connect', (session) => sendSettings(session, (s) => cb(s))); |
There was a problem hiding this comment.
Perhaps (s) => cb(s) would be more clear, as documentation, if it were written with meaningful variable names (settings?). No need to squeeze it on 80ch; just go multi-line.
Uh oh!
There was an error while loading. Please reload this page.
| --> | ||
| * `windowSize` {number} | ||
| * Returns: 0 |
There was a problem hiding this comment.
In fact it's not exaclty the case, at this stage it returns only zero or throws ERR_OUT_OF_RANGE, the function is mapped to nghttp2_session_set_local_window_size.
If the library changes its internal, the value will be returned.
If it does not fit the philosophy of node, we can return a generic errror that maps all errors at the native code level.
mcollina
left a comment
There was a problem hiding this comment.
Would you mind adding a unit test that verifies this behavior?
| the `Http2Session` after `msecs` milliseconds. The given `callback` is | ||
| registered as a listener on the `'timeout'` event. | ||
| #### http2session.setConnectionWindowSize(windowSize) |
There was a problem hiding this comment.
Would a getter and setter be better for an API?
There was a problem hiding this comment.
It's a good point, I am not sure to be able to detect it. There is not acknoledge on a SETTINGS_INITIAL_WINDOW_SIZE
But, we can add a test for testing the limit of the buffer allocation for instance and insure that code results are covered.
ZYSzys
commented
Jan 4, 2020
Ping @migounette , can you rebase and add some tests so that we can move forward ? |
migounette
commented
Jan 14, 2020
Back on tracks for this activity, I will adresse it as soon as possible |
HarshithaKP
commented
Apr 12, 2020
@migounette, this needs a rebase. |
8ae28ff to
2935f72Comparejasnell
commented
Jun 25, 2020
Unfortunately this work appears to have stalled out. Closing but can reopen if it is picked back up again and rebased. |
Allow to control the connection window size by setting local window
size (local endpoints's window size) to the given window_size.
To increase window size, this function may submit WINDOW_UPDATE frame
to transmission queue.
Pay attention, this function takes the absolute value of window size to set,
rather than the delta, the delta is computed by the update operation.