Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
|
r? libs-api because it's been a while since the original PR was approved. |
This comment has been minimized.
This comment has been minimized.
7f790e2 to
9c1ee90
Compare
|
☔ The latest upstream changes (presumably #139724) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Sorry—I missed that this was ready for review again. Please use |
9c1ee90 to
25fb525
Compare
|
@rustbot ready |
|
Thank you! @bors r+ |
…=dtolnay Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678) rust-lang#94678 was closed because of time constraints of the original author (`@kckeiks).` This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library. In addition, this PR: - implements the change suggested in rust-lang#94678 (comment) - defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed Issue: rust-lang#139166
|
@Dylan-DPC, thank you for the reminder! I had completely overlooked this PR. |
|
@rustbot ready |
|
@dtolnay @Dylan-DPC any chances we can merge this or is there something in the way? |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: David Tolnay <dtolnay@gmail.com>
7402270 to
b0fa536
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
☔ The latest upstream changes (presumably #162622) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
|
r? libs Since this has a tracking issue, this should be fine to merge; just needs a rebase. |
| /// use std::net::TcpStream; | ||
| /// | ||
| /// let stream = TcpStream::connect("[::1]:12345") | ||
| /// .expect("Couldn't connect to the server..."); |
There was a problem hiding this comment.
This should only be indented four spaces; I'm surprised rustfmt doesn't fail on this. Likewise on line 638.
There was a problem hiding this comment.
Rustfmt actually doesn't format doctests, currently. It is a bit of a weird limitation.
| Ok(raw as u32) | ||
| } | ||
|
|
||
| #[cfg(not(all(target_os = "wasi", any(target_env = "p2", target_env = "p3"))))] |
There was a problem hiding this comment.
Let's use cfg_select! inside the body. That way if the cfg changes, it's only one place rather than multiple that need to change.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
View all comments
#94678 was closed because of time constraints of the original author (@kckeiks).
This PR is a refresh of #94678 where the original proposed changes are ported to the current status of the standard library.
In addition, this PR:
set_multicast_hop_limit_v6andmulticast_hop_limit_v6only for UDP sockets and not for TCP sockets as originally proposedIssue: #139166