-
Notifications
You must be signed in to change notification settings - Fork 172
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
feat: make it possible to try several sockaddrs when starting server #567
Conversation
/// let server = builder.build(addrs).unwrap(); | ||
/// } | ||
/// ``` | ||
pub fn build(self, addrs: impl ToSocketAddrs) -> Result<Server, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: this is std::net::ToSocketAddrs
because tokio::std::ToSocketAddrs
is sealed i.e, doesn't provide to_socket_addrs
because we configure the Socket ourselves with some settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lgtm. It would be nice to have a test for this though?
I added a test in the rust docs should be sufficient? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one tiny nit on doc comments.
Closing #562