Crate tokio [−] [src]
Tokio is a network application framework for rapid development and highly scalable production deployments of clients and servers.
Tokio consists of multiple layers.
Service
At a high level, Tokio provides a Service
trait which provides a unified
API for writing clients and servers as well as the ability to build
reusable middleware components.
The service trait is decoupled from any notion of a runtime.
Reactor
The Tokio Reactor is a lightweight, event driven, task scheduler. It accepts tasks, which are small units of work and schedules them for execution when their dependent I/O sources (TCP sockets, timers, etc...) are ready.
The reactor and task exist in the reactor
module.
Protocol building blocks
Tokio aims to provide all the pieces necessary for rapidly developing
protocol implementations. These components exist in the proto
module.
Modules
io |
Traits, helpers, and type definitions for Tokio I/O & non-blocking IO functionality. |
proto |
A collection of components for rapid protocol development |
reactor |
The non-blocking event driven core of Tokio |
server |
A generic Tokio TCP server implementation. |
tcp |
Tokio aware TCP primitives |
udp |
Tokio aware UDP primitives |
util |
Utilities for writing Tokio applications |
Structs
SimpleService |
A service implemented by a closure. |
Traits
NewService |
Creates new |
Service |
An asynchronous function from |
Functions
simple_service |
Returns a |