-
Notifications
You must be signed in to change notification settings - Fork 161
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
ref: Clean up public API regarding bound/local/listening addresses #891
Conversation
This primarily renames .available_addresses() to .listen_addresses() and .listen_addr() to .local_address(). this makes .local_address() consistent with e.g. quinn's API and avoids the confusion between available on the machine vs uses by the provider.
@@ -147,7 +149,7 @@ const fn is_unicast_link_local(addr: Ipv6Addr) -> bool { | |||
} | |||
|
|||
/// Given a listen/bind address, finds all the local addresses for that address family. | |||
pub fn find_local_addresses(listen_addr: SocketAddr) -> Vec<SocketAddr> { | |||
pub(crate) fn find_local_addresses(listen_addr: SocketAddr) -> Result<Vec<SocketAddr>> { |
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.
I don't think this should be pub, and probably should even be in the provider module. Though that would make the diff harder to read.
/netsim |
|
/netsim |
|
This primarily renames .available_addresses() to
.listen_addresses() and .listen_addr() to .local_address(). this
makes .local_address() consistent with e.g. quinn's API and avoids the
confusion between available on the machine vs uses by the provider.