simple-stream

Various wrappers for TcpStream. Relies on read and write syscalls. Very simple data framing pattern.

NbetStream is an async stream designed to be used with epoll Linux kernel's epoll in EdgeTriggered mode.

Documentation

Data Framing

``` 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload Len | Payload | +-----------------------------------------------------------+ | Payload Data Continued | +-----------------------------------------------------------+

Payload Len: 16 bits Payload Data: (Payload Len) bytes ```

Usage

Add the following to your Cargo.toml

toml [dependencies.simple-stream] git = "https://github.com/nathansizemore/simple-stream"

Add the following to your crate root

rust extern crate simple_stream;