Move Framed from tokio-proto to core

This commit extracts the concrete implementation of `FrameIo` in tokio-proto to
tokio-core under the name `EasyFramed`. This extraction is accompanied with a
new `EasyBuf` buffer type to work with when parsing types.

The purpose of this movement is to provide a clear and easy entry point at the
`FramedIo` layer for those who need it. Eventually these buffer types will get
replaced or moved to the `bytes` crate, but in the interest of an 0.1 release
and remaining backwards compatible with the tokio-core 0.1 release this is
adding a separate module.
This commit is contained in:
Alex Crichton
2016-10-21 11:46:32 -07:00
parent 3ced812993
commit b84ef90a98
4 changed files with 558 additions and 0 deletions
+3
View File
@@ -131,6 +131,9 @@ pub trait Io: io::Read + io::Write {
/// value that indicates "would block" the current future's task is arranged to
/// receive a notification when the method would otherwise not indicate that it
/// would block.
///
/// For a sample implementation of `FramedIo` you can take a look at the
/// `EasyFramed` type in the `easy` module of htis crate.
pub trait FramedIo {
/// Messages written
type In;