Function esp_idf_sys::httpd_queue_work

source ·
pub unsafe extern "C" fn httpd_queue_work(
    handle: httpd_handle_t,
    work: httpd_work_fn_t,
    arg: *mut c_void,
) -> esp_err_t
Expand description

@brief Queue execution of a function in HTTPD’s context

This API queues a work function for asynchronous execution

@note Some protocols require that the web server generate some asynchronous data and send it to the persistently opened connection. This facility is for use by such protocols.

@param[in] handle Handle to server returned by httpd_start @param[in] work Pointer to the function to be executed in the HTTPD’s context @param[in] arg Pointer to the arguments that should be passed to this function

@return

  • ESP_OK : On successfully queueing the work
  • ESP_FAIL : Failure in ctrl socket
  • ESP_ERR_INVALID_ARG : Null arguments