Function esp_idf_sys::mbedtls_ssl_get_max_out_record_payload
source ยท pub unsafe extern "C" fn mbedtls_ssl_get_max_out_record_payload(
ssl: *const mbedtls_ssl_context,
) -> c_int
Expand description
\brief Return the current maximum outgoing record payload in bytes.
\note The logic to determine the maximum outgoing record payload is version-specific. It takes into account various factors, such as the mbedtls_config.h setting \c MBEDTLS_SSL_OUT_CONTENT_LEN, extensions such as the max fragment length or record size limit extension if used, and for DTLS the path MTU as configured and current record expansion.
\note With DTLS, \c mbedtls_ssl_write() will return an error if called with a larger length value. With TLS, \c mbedtls_ssl_write() will fragment the input if necessary and return the number of bytes written; it is up to the caller to call \c mbedtls_ssl_write() again in order to send the remaining bytes if any.
\sa mbedtls_ssl_get_max_out_record_payload() \sa mbedtls_ssl_get_record_expansion()
\param ssl SSL context
\return Current maximum payload for an outgoing record, or a negative error code.