rust_tcp_ipc/lib.rs
1#![deny(missing_docs)]
2//! This is a crate for Interprocess Communication via TCP.
3//!
4//! It allows for easy, asynchronous sending and receiving messages/commands.
5//!
6//! A flexible protocol is used, consisting of a command, a length and a payload.
7//!
8//! In detail, it is expected that the used TCP protocol works via exchange of byte collections.
9//! A fixed header length is assumed, so - for example - the first 5 bytes of each message encode the message header.
10//! The header in turn consists of a command (like Stop, Start, Pause, Load, ...) and a length part.
11//! Command & length can be in arbitrary order (but have to be fixed for the protocol).
12//! Then the next length-many bytes which are received are the payload of the message.
13//! Further received bytes form the next message.
14//!
15//! An example is given in the Examples.
16mod protocol;
17mod protocol_buffer;
18mod tcp_ipc;
19pub use self::tcp_ipc::*;
20
21mod tests;