Skip to main content

session_frame_size

Function session_frame_size 

Source
pub const fn session_frame_size<const C: usize>(
    frame_size: usize,
    max_segments: usize,
) -> usize
Expand description

Clamps a requested frame_size between one and max_segments segment payloads.

Preserves frame boundaries within these limits: UDP forwarding turns each reconstructed frame into a datagram, so rounding down could split a datagram that fits the requested frame size.