Function s2n_quic::provider::tls::default::ffi::s2n_connection_set_send_cb

source ·
pub unsafe extern "C" fn s2n_connection_set_send_cb(
    conn: *mut s2n_connection,
    send: Option<unsafe extern "C" fn(_: *mut c_void, _: *const u8, _: u32) -> i32>
) -> i32
Expand description

Configure a connection to use a send callback to send data.

@note This callback may be blocking or nonblocking. @note The callback may send less than the requested length. The function should return the number of bytes sent or set errno and return an error code < 0.

@param conn The connection object being updated @param send A send callback function pointer @returns S2N_SUCCESS on success. S2N_FAILURE on failure