pub unsafe extern "C" fn s2n_connection_set_dynamic_record_threshold(
    conn: *mut s2n_connection,
    resize_threshold: u32,
    timeout_threshold: u16
) -> c_int
Expand description

Changes the behavior of s2n-tls when sending data to initially prefer records small enough to fit in single ethernet frames.

When dynamic record sizing is active, the connection sends records small enough to fit in a single standard 1500 byte ethernet frame. Otherwise, the connection chooses record sizes according to the configured maximum fragment length.

Dynamic record sizing is active for the first resize_threshold bytes of a connection, and is reactivated whenever timeout_threshold seconds pass without sending data.

@param conn The connection object being updated @param resize_threshold The number of bytes to send before changing the record size. Maximum 8MiB. @param timeout_threshold Reset record size back to a single segment after threshold seconds of inactivity @returns S2N_SUCCESS on success. S2N_FAILURE on failure