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

ref: Clean up public API regarding bound/local/listening addresses #891

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

flub
Copy link
Contributor

@flub flub commented Mar 28, 2023

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.

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.
@flub flub requested a review from Arqu March 28, 2023 14:47
@@ -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>> {
Copy link
Contributor Author

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.

@flub flub merged commit bbf4869 into main Mar 29, 2023
@flub flub deleted the flub/local-addr branch March 29, 2023 07:37
@Arqu
Copy link
Collaborator

Arqu commented Apr 4, 2023

/netsim

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

flub/local-addr.2b62d8080eeb1fa6f7bbf81818464e9fa4d5d0e5
Perf report:

test case throughput_gbps
iroh_latency_200ms 1_to_1 2.72
iroh_latency_200ms 1_to_3 8.45
iroh_latency_200ms 1_to_5 9.87
iroh_latency_200ms 1_to_10 9.88
iroh_latency_200ms 2_to_2 6.04
iroh_latency_200ms 2_to_4 12.35
iroh_latency_200ms 2_to_6 15.48
iroh_latency_200ms 2_to_10 16.65
iroh_latency_20ms 1_to_1 2.28
iroh_latency_20ms 1_to_3 8.53
iroh_latency_20ms 1_to_5 9.78
iroh_latency_20ms 1_to_10 8.99
iroh_latency_20ms 2_to_2 6.50
iroh_latency_20ms 2_to_4 12.33
iroh_latency_20ms 2_to_6 15.48
iroh_latency_20ms 2_to_10 15.87
iroh 1_to_1 2.14
iroh 1_to_3 8.99
iroh 1_to_5 11.29
iroh 1_to_10 12.24
iroh 2_to_2 6.62
iroh 2_to_4 12.90
iroh 2_to_6 16.25
iroh 2_to_10 18.21

@Arqu
Copy link
Collaborator

Arqu commented Apr 5, 2023

/netsim

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

flub/local-addr.2b62d8080eeb1fa6f7bbf81818464e9fa4d5d0e5
Perf report:

test case throughput_gbps
iroh_latency_200ms 1_to_1 2.23
iroh_latency_200ms 1_to_3 8.39
iroh_latency_200ms 1_to_5 9.19
iroh_latency_200ms 1_to_10 8.94
iroh_latency_200ms 2_to_2 6.03
iroh_latency_200ms 2_to_4 12.37
iroh_latency_200ms 2_to_6 15.15
iroh_latency_200ms 2_to_10 15.32
iroh_latency_20ms 1_to_1 2.24
iroh_latency_20ms 1_to_3 8.54
iroh_latency_20ms 1_to_5 9.58
iroh_latency_20ms 1_to_10 8.53
iroh_latency_20ms 2_to_2 6.68
iroh_latency_20ms 2_to_4 12.35
iroh_latency_20ms 2_to_6 15.26
iroh_latency_20ms 2_to_10 15.58
iroh 1_to_1 3.02
iroh 1_to_3 8.89
iroh 1_to_5 11.43
iroh 1_to_10 10.38
iroh 2_to_2 6.37
iroh 2_to_4 12.87
iroh 2_to_6 16.19
iroh 2_to_10 18.28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants