Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxinden/asynchronous-codec
Utilities for encoding and decoding frames using `async/await`.
https://github.com/mxinden/asynchronous-codec
async-await encoding networking
Last synced: about 2 months ago
JSON representation
Utilities for encoding and decoding frames using `async/await`.
- Host: GitHub
- URL: https://github.com/mxinden/asynchronous-codec
- Owner: mxinden
- License: mit
- Created: 2021-01-06T10:50:59.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T16:04:09.000Z (about 1 year ago)
- Last Synced: 2024-10-14T12:32:30.906Z (2 months ago)
- Topics: async-await, encoding, networking
- Language: Rust
- Homepage:
- Size: 143 KB
- Stars: 23
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Asynchronous Codec
Utilities for encoding and decoding frames using async/await.
This is a fork of [`futures-codec`](https://github.com/matthunz/futures-codec)
by [Matt Hunzinger](https://github.com/matthunz) borrowing many concepts from
[`tokio-codec`](https://crates.io/crates/tokio-codec).Contains adapters to go from streams of bytes, `AsyncRead` and `AsyncWrite`,
to framed streams implementing `Sink` and `Stream`. Framed streams are also known as transports.[![Latest Version](https://img.shields.io/crates/v/asynchronous-codec.svg)](https://crates.io/crates/asynchronous-codec)
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/asynchronous-codec)
![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)### Example
```rust
use asynchronous_codec::{LinesCodec, Framed};async fn main() {
// let stream = ...
let mut framed = Framed::new(stream, LinesCodec {});while let Some(line) = framed.try_next().await.unwrap() {
println!("{:?}", line);
}
}
```