-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
net: restore TcpStream::{poll_read_ready, poll_write_ready} #2743
Conversation
cc @seanmonstar |
Thanks for the PR! As described in #2728, we want to remove the public dependency on |
@seanmonstar I created a new working branch for that. I implemented TcpStream::is_readable and TcpStream::is_writable for testing purposes (I'll implement correct methods later). These methods simply call Unfortunately, tests fail, which passed before the rebase. Probably, there are some mistakes in my changes. |
#3130 was merged. Should we close this PR, or continue implementing |
We might just have an |
I don't think we can have |
I think the various socket types can still provide |
PR has been rebased onto the current master branch.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Motivation
In some situations, it's necessary to detect TCP disconnect without reading or writing anything to/from that socket.
This PR restores
TcpStream::{poll_read_ready, poll_write_ready}
which were removed at 6d8cc4e.Solution
Restore
TcpStream::{poll_read_ready, poll_write_ready}
.New test cases for those functions are added. See tcp_ready.rs.
This PR closes #2228.