Skip to content

Alternative for tokio::net::TcpListener.incoming().poll_next(...) in tokio 0.3 #2983

Answered by taiki-e
Urhengulas asked this question in Q&A
Discussion options

You must be logged in to vote

You can use poll_accept, like:

let next = ready!(Pin::new(&mut self.as_mut().project().listener).poll_accept(cx)?).0;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Urhengulas
Comment options

Answer selected by Darksonn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants