Expand description
Byte-level encoding and decoding primitives.
These helpers live in dlep-core so that any crate can serialize or parse
DLEP wire bytes without dragging in tokio. The async-friendly
tokio_util::codec::{Decoder, Encoder} wrappers live in dlep-net.
All multi-byte integers are big-endian (network byte order). UTF-8 strings inside Data Items have no length prefix and no NUL terminator; their length is governed by the surrounding TLV header. Insertion order of Data Items is preserved on encode and is decode-stable.
Constantsยง
- MESSAGE_
HEADER_ LEN - Length of the fixed-size message header:
type (2) || length (2). - SIGNAL_
HEADER_ LEN - Length of the fixed-size signal header:
"DLEP" (4) || type (2) || length (2).