pub unsafe extern "C" fn s2n_config_set_recv_multi_record(
config: *mut s2n_config,
enabled: bool,
) -> i32
Expand description
Enable or disable receiving of multiple TLS records in a single s2n_recv call
By default, s2n-tls returns from s2n_recv() after reading a single TLS record. Enabling receiving of multiple records will instead cause s2n_recv() to attempt to read until the application-provided output buffer is full. This may be more efficient, especially if larger receive buffers are used.
@note If this option is enabled with blocking IO, the call to s2n_recv() will not return until either the application-provided output buffer is full or the peer closes the connection. This may lead to unintentionally long waits if the peer does not send enough data.
@param config The configuration object being updated
@param enabled Set to true
if multiple record receive is to be enabled; false
to disable.
@returns S2N_SUCCESS on success. S2N_FAILURE on failure