readwrite 0.1.0

Combine Read and Write into a single Read+Write object
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
readwrite
---


Given two things, one of which implements `std::io::Read` and other implements `std::io::Write`, make a single socket-like object which implmenets `Read + Write`. Note that you can't write to it while waiting for data to come from read part.

Example: generate a virtual socketpair.

```rust
fn main() {
    extern crate pipe;
    extern crate readwrite;

    let (r1,w1) = pipe::pipe();
    let (r2,w2) = pipe::pipe();
    let (s1,s2) = (ReadWrite::new(r1,w2), ReadWrite::new(r2,w1));
}
```