Crate rustysofh

Source
Expand description

Simple Open Framing Header (SOFH) support.

SOFH provides encoding- and content-agnostic message framing over wire. SOFH mandates that each message is preceded by a six (6) byte header, which contains two pieces of information:

  1. The total length of the current message, in bytes.
  2. The “encoding type” of such message, i.e. a numeric code used to pass information to the receiver(s) as to the kind of payload. EncodingType comes in handy when dealing with standard encoding types.

The preferred way to send and receive SOFH-enclosed messages over wire is with TokioCodec.

Structs§

Frame
An immutable view into a SOFH-enclosed message, complete with its encoding type tag and message payload.
TokioCodec
A tokio_util Decoder and Encoder.

Enums§

EncodingType
Sum type for all SOFH encoding types.
Error
The type returned in the event of an error when decoding SOFH-enclosed messages.