Skip to content

Conversation

xizheyin
Copy link
Member

@xizheyin xizheyin commented Aug 29, 2025

Fixes #145862

I think the most misleading expression is that UDP transmits data as packets rather than as streams, so it appears that partial writes does not occur?

Additionally, the code might consider checking to see if buffer length exceeds the 16-byte limit, and erroring early as a small optimization, during the clamping of buffer length.

For this suggestion in #145862, I think the check should be managed by OS. Either the packet is accepted, or the operating system generates an error, such as EMSGSIZE.

r? libs

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 29, 2025
@ibraheemdev
Copy link
Member

This is pretty minor but it adds the guarantee that partial writes never occur. r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Sep 21, 2025
@rustbot rustbot assigned Amanieu and unassigned ibraheemdev Sep 21, 2025
@Amanieu Amanieu added I-libs-api-nominated Nominated for discussion during a libs-api team meeting. and removed I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Sep 21, 2025
@Amanieu
Copy link
Member

Amanieu commented Sep 21, 2025

This was added in #105394. See #105394 (comment)

cc @workingjubilee @Patiga

@xizheyin xizheyin closed this Oct 8, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UcpSocket::send_to indicates possible partial write behavior inaccurately.

4 participants