Add SO_RCVLOWAT accessors for Linux and Android
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- api, networking
调研方向
The payload names no files, so start from the existing receive-buffer-size accessors and the platform-specific cfg blocks they sit beside; those show the pattern for usize arguments, range checks, and SO_* constants on Linux/Android. Add Socket::recv_lowat and Socket::set_recv_lowat under the all feature, forwarding SO_RCVLOWAT and rejecting values above the kernel's signed range. The proposed TCP test is the done check: a connected socket becomes readable only once queued bytes reach the threshold.
由索引模型根据 Issue 内容生成。
描述
Would socket2 accept Socket::recv_lowat and Socket::set_recv_lowat for the SO_RCVLOWAT socket option?
A TCP receiver can use this option to wait for a batch of received bytes before becoming readable. It is useful when paced traffic otherwise wakes the reader for each small arrival. Raising the threshold can also delay a short read, so the caller still owns when to set it and when to restore it. Linux socket(7)
I propose starting with Linux and Android under the all feature, alongside the existing platform-specific accessors. The methods would use usize in bytes, like the receive buffer size methods, and reject values above the range of the signed integer accepted by the kernel. They would otherwise forward the option to the OS.
The test would use a connected TCP socket and check that it becomes readable when the queued bytes reach the configured threshold.
- 主要语言
- Rust
- 星标
- 885
- 派生
- 328
- 平均合并
- 6 天 12 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/socket2 的其他 Issue
-
Commit lockfile未关闭
难度 2/5 1-3 小时 新手友好度 65/100
rust-lang/socket2#703 · 1 条评论 ·
维护者通常 1 天内回复
-
windows-sys 0.101.0可能已有人在做 @xtqqczze 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
SockAddr::path_len doesn't bound the length by sun_path: as_pathname panics since #691, as_abstract_namespace slices past it可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
`from_timeval` overflows on a non-normalised `tv_usec`可能已有人在做 @pederbe 于 18 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Build fails on 32-bit glibc (i686, armv7) with libc's `--cfg=libc_unstable_time64`: `tv_usec` is cast to `suseconds_t` (i32) for an i64 field可能已有人在做 @omrzk 于 28 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
rust-lang/socket2#684 · 1 条评论 ·
维护者通常 1 天内回复
查看 rust-lang/socket2 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
infra
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
available bug good first issue tooling
难度 2/5 1-3 小时 新手友好度 78/100
Nixitov/Riptide-Native#817 ·
维护者通常 1 天内回复