Send and receive serde-compatible objects over TCP (async)
With the log feature (enabled by default), the following events will be logged:
- clean disconnects (
DEBUG) - dirty disconnects (
ERROR) - codec/serde errors (
ERROR) - message reception/emission (
TRACE)
Roadmap
- async-fifo support
- async-channel support
- logging
- compression (gzip, lz4, lzma)
- other encodings (CBOR, BSON, MessagePack)
Example
let addr = ;
let stream = connect.unwrap;
let stream = try_from.unwrap;
type Incoming = String;
type Outgoing = u32;
let = ;
// spawn this task in an asynchronous executor
tx.send;
async ;