Type Alias esp_idf_sys::httpd_pending_func_t

source ·
pub type httpd_pending_func_t = Option<unsafe extern "C" fn(hd: httpd_handle_t, sockfd: c_int) -> c_int>;
Expand description

@brief Prototype for HTTPDs low-level “get pending bytes” function

@note User specified pending function must handle errors internally, depending upon the set value of errno, and return specific HTTPD_SOCK_ERR_ codes, which will be handled accordingly in the server task.

@param[in] hd server instance @param[in] sockfd session socket file descriptor @return

  • Bytes : The number of bytes waiting to be received
  • HTTPD_SOCK_ERR_INVALID : Invalid arguments
  • HTTPD_SOCK_ERR_TIMEOUT : Timeout/interrupted while calling socket pending()
  • HTTPD_SOCK_ERR_FAIL : Unrecoverable error while calling socket pending()

Aliased Type§

enum httpd_pending_func_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: i32) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: i32) -> i32)

Some value of type T.