Function esp_idf_hal::sys::httpd_sess_set_recv_override

source ·
pub unsafe extern "C" fn httpd_sess_set_recv_override(
    hd: *mut c_void,
    sockfd: i32,
    recv_func: Option<unsafe extern "C" fn(_: *mut c_void, _: i32, _: *mut i8, _: usize, _: i32) -> i32>,
) -> i32
Expand description

@brief Override web server’s receive function (by session FD)

This function overrides the web server’s receive function. This same function is used to read HTTP request packets.

@note This API is supposed to be called either from the context of - an http session APIs where sockfd is a valid parameter - a URI handler where sockfd is obtained using httpd_req_to_sockfd()

@param[in] hd HTTPD instance handle @param[in] sockfd Session socket FD @param[in] recv_func The receive function to be set for this session

@return

  • ESP_OK : On successfully registering override
  • ESP_ERR_INVALID_ARG : Null arguments