MCPcopy Index your code
hub / github.com/nodejs/node / remoteCustomSettingsToBuffer

Function remoteCustomSettingsToBuffer

lib/internal/http2/util.js:530–546  ·  view source on GitHub ↗
(remoteCustomSettings)

Source from the content-addressed store, hash-verified

528}
529
530function remoteCustomSettingsToBuffer(remoteCustomSettings) {
531 if (remoteCustomSettings.length > MAX_ADDITIONAL_SETTINGS)
532 throw new ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS();
533 let numCustomSettings = 0;
534 for (let i = 0; i < remoteCustomSettings.length; i++) {
535 const nsetting = remoteCustomSettings[i];
536 if (typeof nsetting === 'number' && nsetting <= 0xffff &&
537 nsetting >= 0) {
538 settingsBuffer[IDX_SETTINGS_FLAGS + 1 + 2 * numCustomSettings + 1] = nsetting;
539 numCustomSettings++;
540 } else
541 throw new ERR_HTTP2_INVALID_SETTING_VALUE.RangeError(
542 'Range Error', nsetting, 0, 0xffff);
543
544 }
545 settingsBuffer[IDX_SETTINGS_FLAGS + 1] = numCustomSettings;
546}
547
548function getSessionState(session) {
549 session.refreshState();

Callers 1

setupHandleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…