Function s2n_tls_sys::s2n_connection_set_recv_cb

source ·
pub unsafe extern "C" fn s2n_connection_set_recv_cb(
    conn: *mut s2n_connection,
    recv: s2n_recv_fn
) -> c_int
Expand description

Configure a connection to use a recv callback to receive data.

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

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