Crate stakker_mio

Crate stakker_mio 

Source
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§

FdSource
Evented instance to handle an arbitrary UNIX file descriptor
MioPoll
Ref-counting wrapper around a mio Poll instance
MioSource
Wrapper for a mio Source instance
Ready
Readiness information from mio
TcpStreamBuf
Type to aid with managing a mio::net::TcpStream along with MioPoll
UdpQueue
Type to aid with managing a connected mio::net::UdpSocket along with MioPoll
UdpServerQueue
Type to aid with managing a server mio::net::UdpSocket along with MioPoll

Enums§

ReadStatus
Result of a TcpStreamBuf::read operation