Bincode based tokio-codec
adapter.
First, add this to your Cargo.toml
:
toml
[dependencies]
tokio-bincode = "0.1"
Then you can use it like so:
``` rust
struct MyProtocol;
// Create the codec based on your custom protocol
let codec = BinCodec::
// Frame the transport with the codec to produce a stream/sink let (sink, stream) = Framed::new(transport, codec).split(); ```
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tokio-bincode by you, shall be licensed as MIT, without any additional terms or conditions.