-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: add poll_{recv,send}_ready methods to udp/uds_datagram #4131
Conversation
8f224af
to
a7a8325
Compare
Please check the rustfmt CI job. |
a7a8325
to
d67a388
Compare
tokio/src/net/udp.rs
Outdated
/// stream becomes ready for writing, `Waker::wake` will be called on the | ||
/// waker. | ||
/// | ||
/// Note that on multiple calls to `poll_write_ready` or `poll_write`, only |
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.
There is no poll_write
method on UdpSocket
. This should instead mention poll_send
and poll_send_to
.
tokio/src/net/udp.rs
Outdated
/// Note that on multiple calls to `poll_read_ready`, `poll_read` or | ||
/// `poll_peek`, only the `Waker` from the `Context` passed to the most |
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.
Same here.
d67a388
to
4a19b23
Compare
shouldn't we rename the two methods poll_recv_ready and poll_send_ready? |
Sure, that makes sense to me. |
I just noticed that the methods are also missing on |
4a19b23
to
bf096a9
Compare
similar to unix and tcp sockets, this commits brings `poll_read_ready` and `poll_write_ready` methods. Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
bf096a9
to
5291bc6
Compare
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
UDP was missing
poll_read_ready
andpoll_write_ready
methodsUDS datagram was missing them as well
Solution
similar to unix and tcp sockets, this brings poll_read_ready and
poll_write_ready methods to udp and UDS Datagram