Thomasdezeeuw / gaea

Low-level library to build event driven applications, supporting lightweight non-blocking I/O.
https://docs.rs/gaea/
MIT License
16 stars 0 forks source link

Better document what readiness to use #26

Closed Thomasdezeeuw closed 5 years ago

Thomasdezeeuw commented 5 years ago

For example a TcpListener what Ready value should it have when registering to get all events? Try to document that for each type.

Thomasdezeeuw commented 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.

Thomasdezeeuw commented 5 years ago

What I currently use to get all events.

In net module:

In unix module: