-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add connect_from methods to TcpStream #115710
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
Conversation
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 (
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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. 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. |
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? |
Oh right, there was a somewhat related request in rust-lang/libs-team#66 which was about unbound UDP sockets. |
@valaphee @rustbot label: +S-inactive |
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