Skip to content

Rename recvfrom -> recv_from, sendto -> send_to. #15265

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

Closed
wants to merge 2 commits into from
Closed

Rename recvfrom -> recv_from, sendto -> send_to. #15265

wants to merge 2 commits into from

Conversation

omasanori
Copy link
Contributor

POSIX has recvfrom(2) and sendto(2), but their name seem not to be suitable with Rust. We already renamed getpeername(2) and getsockname(2), so I think it makes sense.

Alternatively, receive_from would be fine. However, we have .recv() so I chose recv_from.

What do you think? If this makes sense, should I provide recvfrom and sendto deprecated methods just calling new methods for compatibility?

@brson
Copy link
Contributor

brson commented Jun 30, 2014

I think I agree with this. If we do it, then yes we should leave the old ones, marked deprecated and explaining why.

@omasanori
Copy link
Contributor Author

recvfrom and sendto are added for compatibility.

omasanori added 2 commits July 2, 2014 08:21
POSIX has recvfrom(2) and sendto(2), but their name seem not to be
suitable with Rust. We already renamed getpeername(2) and
getsockname(2), so I think it makes sense.

Alternatively, `receive_from` would be fine. However, we have `.recv()`
so I chose `recv_from`.

Signed-off-by: OGINO Masanori <[email protected]>
We leave them for compatibility, but mark them as deprecated.

Signed-off-by: OGINO Masanori <[email protected]>
bors added a commit that referenced this pull request Jul 2, 2014
POSIX has recvfrom(2) and sendto(2), but their name seem not to be suitable with Rust. We already renamed getpeername(2) and getsockname(2), so I think it makes sense.

Alternatively, `receive_from` would be fine. However, we have `.recv()` so I chose `recv_from`.

What do you think? If this makes sense, should I provide `recvfrom` and `sendto` deprecated methods just calling new methods for compatibility?
@bors bors closed this Jul 2, 2014
@omasanori omasanori deleted the udp branch July 2, 2014 13:34
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
…r=lnicola

editor/code: Update dependencies

This includes:

- Some major changes.
    - [typescript-eslint v6](https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/)
    - [prettier v3](https://prettier.io/blog/2023/07/05/3.0.0.html)
- ~Update ``@types/vscode`` to [1.79](https://code.visualstudio.com/updates/v1_79).~
    - ~[1.80 has been released](https://code.visualstudio.com/updates/v1_80). We can now bump it.~
    - _Update1: I removed this change. See the below comments_
- and some patch/minor updates.
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 this pull request may close these issues.

3 participants