http2session.settings([settings][, callback])
-
settings
<HTTP/2 Settings Object> -
callback
<Function> 一旦会话连接或会话已连接时立即调用的回调。¥
callback
<Function> Callback that is called once the session is connected or right away if the session is already connected.-
settings
<HTTP/2 Settings Object> 更新后的settings
对象。¥
settings
<HTTP/2 Settings Object> The updatedsettings
object. -
duration
<integer>
更新此 Http2Session
的当前本地设置并向连接的 HTTP/2 对等方发送新的 SETTINGS
帧。
¥Updates the current local settings for this Http2Session
and sends a new
SETTINGS
frame to the connected HTTP/2 peer.
一旦调用,当会话等待远程对等方确认新设置时,http2session.pendingSettingsAck
属性将为 true
。
¥Once called, the http2session.pendingSettingsAck
property will be true
while the session is waiting for the remote peer to acknowledge the new
settings.
在收到 SETTINGS
确认并触发 'localSettings'
事件之前,新设置不会生效。可以在确认未决时发送多个 SETTINGS
帧。
¥The new settings will not become effective until the SETTINGS
acknowledgment
is received and the 'localSettings'
event is emitted. It is possible to send
multiple SETTINGS
frames while acknowledgment is still pending.