Crate skrillax_codec
source ·Expand description
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.
Structs§
- A codec to read and write SilkroadFrame from/onto a byte stream. This implements Encoder and Decoder to be used in combination with tokio framed read/write. Essentially, this wraps the SilkroadFrame::serialize and SilkroadFrame::parse functions to serialize & deserialize the frames.
Enums§
- A ‘frame’ denotes the most fundamental block of data that can be sent between the client and the server in Silkroad Online. Any and all operations or data exchanges are built on top of a kind of frame.