apr_socket_sendfile

Function apr_socket_sendfile 

Source
pub unsafe extern "C" fn apr_socket_sendfile(
    sock: *mut apr_socket_t,
    file: *mut apr_file_t,
    hdtr: *mut apr_hdtr_t,
    offset: *mut apr_off_t,
    len: *mut apr_size_t,
    flags: apr_int32_t,
) -> apr_status_t
Expand description

Send a file from an open file descriptor to a socket, along with optional headers and trailers @param sock The socket to which we’re writing @param file The open file from which to read @param hdtr A structure containing the headers and trailers to send @param offset Offset into the file where we should begin writing @param len (input) - Number of bytes to send from the file (output) - Number of bytes actually sent, including headers, file, and trailers @param flags APR flags that are mapped to OS specific flags @remark This functions acts like a blocking write by default. To change this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK socket option. The number of bytes actually sent is stored in the len parameter. The offset parameter is passed by reference for no reason; its value will never be modified by the apr_socket_sendfile() function.