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

Change UnixListener::poll_accept to public #2845

Merged
merged 1 commit into from Sep 23, 2020

Conversation

kalcutter
Copy link
Contributor

This makes it consistent with TcpListener::poll_accept and other
public poll methods the library provides. This particular method is
useful for writing generic code that accepts connections since async
functions can't easily be used with traits. It is possible to
generically accept connections with Incoming, however, this doesn't
return the incoming SocketAddr.

@kalcutter
Copy link
Contributor Author

Please also apply this to the v0.2.x branch.

@taiki-e taiki-e added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net labels Sep 19, 2020
This makes it consistent with `TcpListener::poll_accept` and other
public poll methods the library provides. This particular method is
useful for writing generic code that accepts connections since async
functions can't easily be used with traits. It is possible to
generically accept connections with `Incoming`, however, this doesn't
return the incoming `SocketAddr`.
@kalcutter
Copy link
Contributor Author

Good point. I added/updated the docs.

@Darksonn
Copy link
Contributor

Please also apply this to the v0.2.x branch.

We are going to need two PRs to apply it to both.

@kalcutter
Copy link
Contributor Author

OK. I will make a second PR when this one gets approved.

@Darksonn Darksonn merged commit 3114d9e into tokio-rs:master Sep 23, 2020
@kalcutter kalcutter deleted the pub-fn-poll_accept branch September 24, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants