Function esp_idf_svc::hal::sys::mbedtls_ssl_set_timer_cb
source · pub unsafe extern "C" fn mbedtls_ssl_set_timer_cb(
ssl: *mut mbedtls_ssl_context,
p_timer: *mut c_void,
f_set_timer: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u32)>,
f_get_timer: Option<unsafe extern "C" fn(_: *mut c_void) -> i32>,
)
Expand description
\brief Set the timer callbacks (Mandatory for DTLS.)
\param ssl SSL context \param p_timer parameter (context) shared by timer callbacks \param f_set_timer set timer callback \param f_get_timer get timer callback. Must return:
\note See the documentation of \c mbedtls_ssl_set_timer_t and \c mbedtls_ssl_get_timer_t for the conventions this pair of callbacks must follow.
\note On some platforms, timing.c provides \c mbedtls_timing_set_delay() and \c mbedtls_timing_get_delay() that are suitable for using here, except if using an event-driven style.
\note See also the “DTLS tutorial” article in our knowledge base. https://mbed-tls.readthedocs.io/en/latest/kb/how-to/dtls-tutorial