tag | 8e712a26a0a38586ed08f901336b3062507a1df1 | |
---|---|---|
tagger | Alex Crichton <alex@alexcrichton.com> | Tue Nov 22 15:39:33 2016 -0800 |
object | 3b38e518cab98fc7d1aa2e55b5df91df1d22c713 |
Version 0.1.1 * Add `io::read` to read some bytes, but return after the first. * Add `poll_{read,write}` on halves returned by `split`. * Add `Handle::spawn_fn` as a convenience. * Add `io::read_until` which operates on `BufRead`. * Add `reactor::Interval` for periodic timers. * Deprecate `FramedIo` in favor of `Stream + Sink` from the futures crate * Add `io::Codec` which defines methods of how to read/write frames from an I/O stream, and then add `Io::framed` as well which consumes an I/O stream as well as a `Codec` and returns a `Stream + Sink`. * Add `PollEvented::deregister` * Implement `Io::split` with `BiLock`, removing restrictions about being on the same futures task. * Add `Core::turn` to turn the evetn loop once. * Deprecate the `channel` module in favor of the new `futures::sync::mpsc`. * Add `net::UdpCodec` along the same lines as `io::Codec` which works with `UdpSocket::framed` to go from a UDP socket to a `Stream + Sink` easily. * Add `UdpSocket::recv_dgram` and `UdpSocket::send_dgram`, future-based methods for reading/writing datagrams.
commit | 3b38e518cab98fc7d1aa2e55b5df91df1d22c713 | [log] [tgz] |
---|---|---|
author | Alex Crichton <alex@alexcrichton.com> | Tue Nov 22 15:39:13 2016 -0800 |
committer | Alex Crichton <alex@alexcrichton.com> | Tue Nov 22 15:39:13 2016 -0800 |
tree | d3e8b23b65fa1436e7fd9ddab7074b6137a71828 | |
parent | 7f96b7e9e4859832e848edac658ff42ca73b7ad7 [diff] |
Bump to 0.1.1
Core I/O and event loop abstraction for asynchronous I/O in Rust built on futures
and mio
.
First, add this to your Cargo.toml
:
[dependencies] tokio-core = "0.1"
Next, add this to your crate:
extern crate tokio_core;
There are a few small examples showing off how to use this library:
This crate is a connection between futures
, a zero-cost implementation of futures in Rust, and mio
, a crate for zero-cost asynchronous I/O. The types and structures implemented in tokio-core
implement Future
and Stream
traits as appropriate. For example, connecting a TCP stream returns a Future
resolving to a TCP stream, and a TCP listener implements a stream of TCP streams (accepted connections).
This crate also provides facilities such as:
Executor
implementation for a futures' Task
The intention of tokio-core
is to provide a concrete implementation for crates built on top of asynchronous I/O. For example you can easily turn a TCP stream into a TLS/SSL stream with the tokio-tls
crate or use the combinators to compose working with data on sockets.
Check out the documentation for more information, and more coming here soon!
tokio-core
is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, and LICENSE-MIT for details.