Skip to main content

MAX_FRAME_BYTES

Constant MAX_FRAME_BYTES 

Source
pub const MAX_FRAME_BYTES: u32 = _; // 1_048_576u32
Expand description

Default per-frame size limit applied by the parent when no explicit cap is configured on the capability builder.

The cap is a parent-side policy decision negotiated to the child at handshake time via Message::ConfigureFrameLimit. Both write_frame and read_frame reject frames whose serialised JSON payload exceeds the cap passed in, so a runaway producer cannot make the peer allocate without bound. The cap is per-connection — set once at handshake, applied to every subsequent frame in both directions.