Function esp_idf_svc::sys::httpd_socket_send
source ยท pub unsafe extern "C" fn httpd_socket_send(
hd: *mut c_void,
sockfd: i32,
buf: *const i8,
buf_len: usize,
flags: i32,
) -> i32
Expand description
A low level API to send data on a given socket
@note This API is not recommended to be used in any request handler. Use this only for advanced use cases, wherein some asynchronous data is to be sent over a socket.
This internally calls the default send function, or the function registered by httpd_sess_set_send_override().
@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()