-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Should be able to poll on a &TcpListener #1413
Comments
Can you describe why you want this? In general, |
As mentioned this is supported through |
@jethrogb one task can call Could you describe the use case? There could be a better way to model what you are trying to do. |
This is not a feature we want for now. Split the |
@Darksonn not sure what you're talking about? This issue is about TcpListener, not TcpStream. |
Oh sorry, I misread the issue title. |
Still, I don't think this is possible with how mio works. When you poll something, only the last used |
That seems fine, the woken up place will accept a connection and other place will get woken up next time? |
No, if you poll it from two places, one of them will keep getting all of the connections and the other is never woken up again. This is because only the last waker is woken. |
This is covered by #2779 and will be supported once that lands. |
Version
0.1.x
Subcrates
tokio-tcp
Description
Accepting a connection in
std
doesn't require mutable access to theTcpListener
, so polling for the same should also not require it. However, there is currently no way to poll a&TcpListener
.TcpStream
does support this throughimpl AsyncRead|AsyncWrite for &'_ TcpStream
(although this was recently removed in master)The text was updated successfully, but these errors were encountered: