nodejs / nodejs/node

quic: Add mechanism similar to waitUntilAvailable to create(Bi|Uni)directionalStream

未关闭
#65,321 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

quic
主要语言
JavaScript
星标
122k
派生
37.3k
平均合并
4 天 2 小时
30 天内合并 PR
283

描述

The webtransport W3 spec allows to pass the option waitUntilAvailable to functions creating streams,
see e,g, here for a bidi stream:

https://www.w3.org/TR/webtransport/#dom-webtransport-createbidirectionalstream

The idea is that if the stream number flow control is exhausted, you have the option for waitUntilAvailable, which if it is set to false throw and tells the caller, that the flow control window for streams is exhausted.

(Alternatively, we can also supply a property to query the current budget).

The same is true for unidirectional stream.

@jasnell @pimterry
What would you think is a good api for this?
P.S: After the stream and session data flow control handling got attention. I will probably after this is decided, activate my stream number flow control tests on webtransport. As the stream number flow control is a another playing field that can easily lead to stalls. (Though I do not know if something is wrong.....)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 issue 中链接的 WebTransport 规范以及现有的 createBidirectionalStream 和 createUnidirectionalStream 入口点开始。将提议的 waitUntilAvailable 行为与当前的流编号流量控制处理方式以及备用的预算查询方案进行比较。完成的标准是:为两个流方向确定一致的 API,并有覆盖流量控制窗口耗尽和可用情况的测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
api, networking
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。