bufstream 0.1.2

Buffered I/O for streams where each read/write half is separately buffered

A crate for separately buffered streams.

This crate provides a BufStream type which provides buffering of both the reading and writing halves of a Read + Write type. Each half is completely independently buffered of the other, which may not always be desired. For example BufStream<File> may have surprising semantics.


bufstream = "0.1"
use std::io::prelude::*;
use std::net::TcpStream;
use bufstream::BufStream;

let stream = TcpStream::connect("localhost:4000").unwrap();
let mut buf = BufStream::new(stream);
buf.read(&mut [0; 1024]).unwrap();
buf.write(&[0; 1024]).unwrap();