* The priority of the stream. If the stream is destroyed or if * the session does not support priority, `null` will be * returned. * @type {StreamPriority | null}
()
| 2436 | * @type {StreamPriority | null} |
| 2437 | */ |
| 2438 | get priority() { |
| 2439 | assertIsQuicStream(this); |
| 2440 | if (this.destroyed || |
| 2441 | !getQuicSessionState(this.#inner.session).isPrioritySupported) return null; |
| 2442 | const packed = this.#handle.getPriority(); |
| 2443 | const urgency = packed >> 1; |
| 2444 | const incremental = !!(packed & 1); |
| 2445 | const level = urgency < 3 ? 'high' : urgency > 3 ? 'low' : 'default'; |
| 2446 | return { level, incremental }; |
| 2447 | } |
| 2448 | |
| 2449 | /** |
| 2450 | * Sets the priority of the stream. |
no test coverage detected