stream.priority


  • 类型:<Object> | <null>
    • level <string> 'high''default''low' 中的一个。
    • incremental <boolean> 是否应该将流数据与同一优先级级别的其他流交错。

流的当前优先级。如果会话不支持优先级(例如,非 HTTP/3)或流已被销毁,则返回 null。 只读。使用 stream.setPriority() 来更改优先级。

🌐 The current priority of the stream. Returns null if the session does not support priority (e.g. non-HTTP/3) or if the stream has been destroyed. Read only. Use stream.setPriority() to change the priority.

在客户端 HTTP/3 会话中,该值反映了通过 stream.setPriority() 设置的内容。在服务器端 HTTP/3 会话中,该值反映了对等方请求的优先级(例如,来自 PRIORITY_UPDATE 帧)。

🌐 On client-side HTTP/3 sessions, the value reflects what was set via stream.setPriority(). On server-side HTTP/3 sessions, the value reflects the peer's requested priority (e.g., from PRIORITY_UPDATE frames).