Improve control on close reason
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 5.5k
- 派生
- 376
- PR 合并指标
- 30 天内没有已合并 PR
描述
What's the intended usage pattern of the Reader and Writer context w.r.t. closing the connection from the server side?
It seems like the connection is closed automatically by the reader / writer when the context is cancelled. However, I don't have any way of impacting the status and reason for that close within the reader / writer.
Is the intention that the user of the reader / writer closes the connection with the status and reason they want and let the writer / reader return?
Another option could be that this package would support influencing the close status and reason via an error provided as context cancellation cause.
WDYT?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先追踪 Reader 和 Writer 如何处理上下文取消,以及调用方目前如何关闭服务器端连接。将提议的 cancellation cause 方法与显式关闭连接进行比较,然后在确定两条路径的测试之前,定义预期的 close status 和 reason 行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- networking
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100