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

Add connect_from methods to TcpStream #115710

Closed
wants to merge 3 commits into from

Conversation

valaphee
Copy link

@valaphee valaphee commented Sep 9, 2023

When having multiple ip addresses assigned, it is not possible to use a specific one when establishing a TCP connection. connect_from solves this allowing to use a specific ip to bind first.

Solves #68053

@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Sep 9, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@the8472 the8472 assigned the8472 and unassigned m-ou-se Feb 14, 2024
@the8472
Copy link
Member

the8472 commented Feb 14, 2024

As mentioned in #68053 (comment) I think this API is too inflexible for the many ways that sockets can be built up and adding use cases one method at a time will likely lead to bad API design.
Compare to the Socket2 API surface for example.

Imo this requires discussion about the overall design we're aiming for and whether there could be intermediate steps. Filing an ACP could be a start.

@the8472 the8472 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 14, 2024
@valaphee
Copy link
Author

I agree that its to inflexible, and could ultimately be replaced by a more flexible socket api in general.

Isn't there already an ACP for a socket api overhaul?

@the8472
Copy link
Member

the8472 commented Feb 14, 2024

Oh right, there was a somewhat related request in rust-lang/libs-team#66 which was about unbound UDP sockets.

@Amanieu Amanieu removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 21, 2024
@JohnCSimon
Copy link
Member

@valaphee
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you are going to continue please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this May 26, 2024
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants