Crate stakker_mio[][src]

Expand description

Integrates mio into Stakker.

MioPoll is the main type. It handles polling and converting mio events into Stakker forward calls. It offers priority levels to allow some events to take priority over others. In addition token cleanup is handled through drop handlers.

TcpStreamBuf makes it easier to do buffering for a mio::net::TcpStream.

FdSource wraps an arbitrary UNIX file descriptor for use with MioPoll.

All calls retry on ErrorKind::Interrupted internally, so this error doesn’t have to be handled by the caller. Retrying is the most helpful behaviour in a non-blocking event loop. In an app using blocking I/O you might want a blocked call to be cut short on a signal, but that case doesn’t apply here.

The mio version used by this library is re-exported as stakker_mio::mio. This should be used by applications in place of importing mio directly, to guarantee they’re using the same version.

Re-exports

pub use mio;

Structs

Evented instance to handle an arbitrary UNIX file descriptor

Ref-counting wrapper around a mio Poll instance

Wrapper for a mio Source instance

Readiness information from mio

Type to aid with managing a mio::net::TcpStream along with MioPoll

Type to aid with managing a connected mio::net::UdpSocket along with MioPoll

Type to aid with managing a server mio::net::UdpSocket along with MioPoll

Enums

Result of a TcpStreamBuf::read operation