2 releases
0.1.1 | Apr 28, 2024 |
---|---|
0.1.0 | Apr 21, 2024 |
#2143 in Parser implementations
38 downloads per month
Used in 3 crates
(2 directly)
21KB
353 lines
skrillax-codec
skrillax-codec
is part of the skrillax-network
family of
crates for handling the network part of communication between a Silkroad Online client and/or server. This crate
specifically deals with partitioning a byte stream into individual frames which can then be handled by a higher layer.
Documentation
For documentation, please see the docs.rs page.
License
Like the rest of the skrillax-network
crates, this crate is licensed under the MIT license.
lib.rs
:
skrillax-codec
is a crate to turn a raw stream of bytes into more meaningful frames in
the format used by Silkroad Online. Framing is only the first step, as a frame is still
quite a general object and does itself not provide many operations. Instead, operations
are contained inside frames and will need to be decoded/encoded separately.
This crate provides two things: the [SilkroadFrame] and [SilkroadCodec]. The latter, [SilkroadCodec], is expected to be used in combination with tokio's tokio_util::codec::FramedWrite & tokio_util::codec::FramedRead. It uses the former, [SilkroadFrame], as the type it produces. However, it is totally possible to use this crate without using the codec by using the [SilkroadFrame]'s serialization and deserialization functions.
Dependencies
~0.2–6.5MB
~21K SLoC