'localSettings' 事件
settings
<HTTP/2 Settings Object> 接收到了SETTINGS
帧的副本。
当接收到确认 SETTINGS
帧时触发 'localSettings'
事件。
当使用 http2session.settings()
提交新的设置时,修改后的设置在 'localSettings'
事件触发后才会生效。
session.settings({ enablePush: false });
session.on('localSettings', (settings) => {
/* 使用新的设置 */
});
settings
<HTTP/2 Settings Object> A copy of theSETTINGS
frame received.
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 */
});