Closed Thomasdezeeuw closed 5 years ago
Or better provide a per type readiness, for example:
impl TcpStream {
/// The advised interests to use when registering a `TcpStream`.
const INTERESTS: Ready = Ready::READABLE | Ready::WRITABLE;
// ...
}
This currently doesn't work since the or operator (|
) isn't a constant function.
What I currently use to get all events.
In net
module:
Ready::READABLE
,Ready::READABLE | Ready::WRITABLE
,Ready::READABLE | Ready::WRITABLE
,Ready::READABLE | Ready::WRITABLE
.In unix
module:
Ready::READABLE
,Ready::WRITABLE
,
For example a
TcpListener
whatReady
value should it have when registering to get all events? Try to document that for each type.