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

AddrListener should accept IntoSocketAddrs #1959

Closed
nagisa opened this issue Sep 30, 2019 · 6 comments · Fixed by #1985
Closed

AddrListener should accept IntoSocketAddrs #1959

nagisa opened this issue Sep 30, 2019 · 6 comments · Fixed by #1985

Comments

@nagisa
Copy link

nagisa commented Sep 30, 2019

What it says on the tin: TcpListener allows for multiple addresses to be provided. I haven’t looked too deeply into whether AddrListener is stuck with a single address, but if it isn’t it should support binding to multiple addresses!

@seanmonstar
Copy link
Member

TcpListener::bind will resolve a list of addresses, and try to bind in the order received until one successfully binds. It won't bind to multiple addresses at once, though.

@nagisa
Copy link
Author

nagisa commented Oct 2, 2019

Well I would usually have a list of SockAddrV6 and SockAddrV4, both with an UNSPECIFIED address.

Is that not something one should be doing?

@seanmonstar
Copy link
Member

It certainly makes sense to listen on multiple addresses. I'd probably just multiple Servers, one with each address.

seanmonstar added a commit that referenced this issue Oct 18, 2019
…rvice`

The only important trait for a user is the `tower::Service` trait, which
is now available also at `hyper::service::Service`. The other "trait
aliases" are no longer publicly exported, as people thought they had to
implement them.

Also removes dependency on `tower-make`, which is trivial but otherwise
shouldn't affect anyone.

Closes #1959
seanmonstar added a commit that referenced this issue Oct 19, 2019
…rvice`

The only important trait for a user is the `tower::Service` trait, which
is now available also at `hyper::service::Service`. The other "trait
aliases" are no longer publicly exported, as people thought they had to
implement them.

Also removes dependency on `tower-make`, which is trivial but otherwise
shouldn't affect anyone.

Closes #1959
seanmonstar added a commit that referenced this issue Oct 19, 2019
…rvice`

The only important trait for a user is the `tower::Service` trait, which
is now available also at `hyper::service::Service`. The other "trait
aliases" are no longer publicly exported, as people thought they had to
implement them.

Also removes dependency on `tower-make`, which is trivial but otherwise
shouldn't affect anyone.

Closes #1959
seanmonstar added a commit that referenced this issue Oct 21, 2019
…rvice`

The only important trait for a user is the `tower::Service` trait, which
is now available also at `hyper::service::Service`. The other "trait
aliases" are no longer publicly exported, as people thought they had to
implement them.

Also removes dependency on `tower-make`, which is trivial but otherwise
shouldn't affect anyone.

Closes #1959
@nagisa
Copy link
Author

nagisa commented Oct 21, 2019

@seanmonstar just making sure, was that PR intended to close this?

@seanmonstar
Copy link
Member

Hrm, nope, that was a typo :(

However, I don't know what more to do with this issue.

@nagisa
Copy link
Author

nagisa commented Oct 21, 2019

Its fine to keep it closed in that case. Thanks!

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 a pull request may close this issue.

2 participants