[][src]Crate tokio_reactor

Event loop that drives Tokio I/O resources.

The reactor is the engine that drives asynchronous I/O resources (like TCP and UDP sockets). It is backed by mio and acts as a bridge between mio and futures.

The crate provides:

Application authors will not use this crate directly. Instead, they will use the tokio crate. Library authors should only depend on tokio-reactor if they are building a custom I/O resource.

For more details, see reactor module documentation in the Tokio crate.

Structs

Background

Handle to the reactor running on a background thread.

Handle

A reference to a reactor.

PollEvented

Associates an I/O resource that implements the std::io::Read and/or std::io::Write traits with the reactor that drives it.

Reactor

The core reactor, or event loop.

Registration

Associates an I/O resource with the reactor instance that drives it.

SetFallbackError

Error returned from Handle::set_fallback.

Shutdown

Future that resolves when the reactor thread has shutdown.

Turn

Return value from the turn method on Reactor.

Functions

with_default

Set the default reactor for the duration of the closure