'localSettings' 事件


当接收到确认 SETTINGS 帧时触发 'localSettings' 事件。

当使用 http2session.settings() 提交新的设置时,修改后的设置在 'localSettings' 事件触发后才会生效。

session.settings({ enablePush: false });

session.on('localSettings', (settings) => {
  /* 使用新的设置 */
});

The 'localSettings' event is emitted when an acknowledgment SETTINGS frame has been received.

When using http2session.settings() to submit new settings, the modified settings do not take effect until the 'localSettings' event is emitted.

session.settings({ enablePush: false });

session.on('localSettings', (settings) => {
  /* Use the new settings */
});