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 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
comp-s3queue
難度 2/5 1-3 小時 新手友好度 70/100
ClickHouse/ClickHouse#137649 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
aaif-goose/goose#14047 ·
維護者通常 1 天內回覆
-
[flow_common] string_utils::split_into_lines and indent return lines in reverse order可能已有人在做 @asxxb 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 88/100
-
[Bug]: Installation source reads "Not identified" on the AUR openlogi-bin package可能已有人在做 @stevie86 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆