We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bind()
std::net::TcpStream
std::net::TcpStream doesn't expose an API to bind to local IP addresses.
Python solves this with an optional source_address argument.
source_address
mio seems to expose this with a bind method, and I think the standard library shouldn't omit such functionality.
bind
The text was updated successfully, but these errors were encountered:
Thanks for the report! This is currently covered by the std::net expansion RFC issue, though, so closing in favor of that.
Sorry, something went wrong.
For anyone in the future,, you can do this using the net2 crate - https://docs.rs/net2/0.2.32/net2/struct.TcpBuilder.html
net2
No branches or pull requests
std::net::TcpStream
doesn't expose an API to bind to local IP addresses.Python solves this with an optional
source_address
argument.mio seems to expose this with a
bind
method, and I think the standard library shouldn't omit such functionality.The text was updated successfully, but these errors were encountered: