stream.setPriority([options])


  • options <Object>
    • level <string> 优先级别。可选值为 'high''default''low'默认值: 'default'
    • incremental <boolean>true 时,来自此流的数据可能与同一优先级级别的其他流的数据交错。默认: false

设置流的优先级。如果会话不支持优先级(例如非 HTTP/3),则抛出 ERR_INVALID_STATE。如果流已被销毁,则无效。

🌐 Sets the priority of the stream. Throws ERR_INVALID_STATE if the session does not support priority (e.g. non-HTTP/3). Has no effect if the stream has been destroyed.