aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r--src/include/microhttpd.h51
1 files changed, 44 insertions, 7 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 4e22ee39..cb0c8a28 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2076,11 +2076,27 @@ MHD_create_response_from_buffer (size_t size,
2076 * @return NULL on error (i.e. invalid arguments, out of memory) 2076 * @return NULL on error (i.e. invalid arguments, out of memory)
2077 * @ingroup response 2077 * @ingroup response
2078 */ 2078 */
2079/* NOTE: this should be 'uint64_t' instead of 'size_t', but changing
2080 this would break API compatibility. */
2081_MHD_EXTERN struct MHD_Response * 2079_MHD_EXTERN struct MHD_Response *
2082MHD_create_response_from_fd (size_t size, 2080MHD_create_response_from_fd (size_t size,
2083 int fd); 2081 int fd);
2082
2083
2084/**
2085 * Create a response object. The response object can be extended with
2086 * header information and then be used any number of times.
2087 *
2088 * @param size size of the data portion of the response;
2089 * sizes larger than 2 GiB may be not supported by OS or
2090 * MHD build
2091 * @param fd file descriptor referring to a file on disk with the
2092 * data; will be closed when response is destroyed;
2093 * fd should be in 'blocking' mode
2094 * @return NULL on error (i.e. invalid arguments, out of memory)
2095 * @ingroup response
2096 */
2097_MHD_EXTERN struct MHD_Response *
2098MHD_create_response_from_fd64 (uint64_t size,
2099 int fd);
2084 2100
2085 2101
2086/** 2102/**
@@ -2099,12 +2115,33 @@ MHD_create_response_from_fd (size_t size,
2099 * @return NULL on error (i.e. invalid arguments, out of memory) 2115 * @return NULL on error (i.e. invalid arguments, out of memory)
2100 * @ingroup response 2116 * @ingroup response
2101 */ 2117 */
2102/* NOTE: this should be 'uint64_t' instead of 'size_t', but changing 2118_MHD_DEPR_FUNC("Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2103 this would break API compatibility. */
2104_MHD_EXTERN struct MHD_Response * 2119_MHD_EXTERN struct MHD_Response *
2105MHD_create_response_from_fd_at_offset (size_t size, 2120MHD_create_response_from_fd_at_offset (size_t size,
2106 int fd, 2121 int fd,
2107 off_t offset); 2122 off_t offset);
2123
2124
2125/**
2126 * Create a response object. The response object can be extended with
2127 * header information and then be used any number of times.
2128 *
2129 * @param size size of the data portion of the response;
2130 * sizes larger than 2 GiB may be not supported by OS or
2131 * MHD build
2132 * @param fd file descriptor referring to a file on disk with the
2133 * data; will be closed when response is destroyed;
2134 * fd should be in 'blocking' mode
2135 * @param offset offset to start reading from in the file;
2136 * reading file beyond 2 GiB may be not supported by OS or
2137 * MHD build
2138 * @return NULL on error (i.e. invalid arguments, out of memory)
2139 * @ingroup response
2140 */
2141_MHD_EXTERN struct MHD_Response *
2142MHD_create_response_from_fd_at_offset64 (uint64_t size,
2143 int fd,
2144 uint64_t offset);
2108 2145
2109 2146
2110#if 0 2147#if 0