memsocket/lib.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5//! memsocket provides a asynchronous socket-like interface for connecting
6//! clients and servers in-memory.
7//!
8//! The [`bounded`](fn.bounded.html) and [`unbounded`](fn.unbounded.html)
9//! methods (analogous to bounded and unbounded
10//! [Channels](https://docs.rs/futures/0.1.21/futures/sync/mpsc/index.html))
11//! return a pair of objects, both of which are
12//! [`AsyncRead`](https://docs.rs/tokio/0.1/tokio/io/trait.AsyncRead.html) and
13//! [`AsyncWrite`](https://docs.rs/tokio/0.1/tokio/io/trait.AsyncWrite.html).
14//! Data written to one can be read from the other, and vice versa,
15//! thus emulating a socket interface.
16
17extern crate futures;
18extern crate tokio;
19
20mod bounded;
21mod compat;
22mod unbounded;
23
24pub use bounded::*;
25pub use compat::*;
26pub use unbounded::*;