Skip to main content

Module wire

Module wire 

Source
Expand description

Frame encoding shared by daemon and client Frame encoding: u32 length prefix + JSON payload

One codec constructor + encode/decode helpers shared by daemon and client so framing parameters can never drift between the two.

Enums§

WireError
Error type returned from encode_frame and decode_frame

Constants§

MAX_FRAME_BYTES
Hard ceiling per frame; larger is a protocol violation

Functions§

codec
Builds the shared length-delimited codec (u32 BE prefix, 16 MiB cap)
decode_frame
Deserializes one frame payload
encode_frame
Serializes one value to a frame payload
reply_id
If frame is a reply, the id it answers; None for anything else, including an event and a frame that is not JSON at all.