pub type httpd_send_func_t = Option<unsafe extern "C" fn(hd: httpd_handle_t, sockfd: c_int, buf: *const c_char, buf_len: usize, flags: c_int) -> c_int>;
Expand description

@brief Prototype for HTTPDs low-level send function

@note User specified send function must handle errors internally, depending upon the set value of errno, and return specific HTTPD_SOCK_ERR_ codes, which will eventually be conveyed as return value of httpd_send() function

@param[in] hd server instance @param[in] sockfd session socket file descriptor @param[in] buf buffer with bytes to send @param[in] buf_len data size @param[in] flags flags for the send() function @return

  • Bytes : The number of bytes sent successfully
  • HTTPD_SOCK_ERR_INVALID : Invalid arguments
  • HTTPD_SOCK_ERR_TIMEOUT : Timeout/interrupted while calling socket send()
  • HTTPD_SOCK_ERR_FAIL : Unrecoverable error while calling socket send()

Aliased Type§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.