Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendFlags::EOT seems to be misspelled #1053

Closed
KarsMulder opened this issue Apr 27, 2024 · 1 comment · Fixed by #1054
Closed

SendFlags::EOT seems to be misspelled #1053

KarsMulder opened this issue Apr 27, 2024 · 1 comment · Fixed by #1054

Comments

@KarsMulder
Copy link

SendFlags::EOT is currently defined as:

/// `MSG_EOT`
const EOT = c::MSG_EOR;

I.e. the flag that appears to be called MSG_EOT actually compiles to MSG_EOR. Indeed, MSG_EOR is the correct name of this send flag according to the man page; a flag called called MSG_EOT doesn't actually exist in Linux as far as I can tell.

I propose that SendFlags::EOT gets renamed to SendFlags::EOR. This, of course, is a breaking API change.

sunfishcode added a commit that referenced this issue Apr 29, 2024
In `rustix::net::SendFlags`, deprecate the mis-spelled `EOT` and add the
correctly-spelled `EOT`.

Fixes #1053.
@sunfishcode
Copy link
Member

Renaming it would be breaking, but we can add the new name and deprecate the old one without a breaking change. I've now opened #1054 to do that.

sunfishcode added a commit that referenced this issue May 1, 2024
* Deprecate `rustix::net::SendFlags::EOT` and add `EOR`.

In `rustix::net::SendFlags`, deprecate the mis-spelled `EOT` and add the
correctly-spelled `EOT`.

Fixes #1053.

* Fix the libc backend too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants