aboutsummaryrefslogtreecommitdiff
path: root/doc/microhttpd.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/microhttpd.texi')
-rw-r--r--doc/microhttpd.texi30
1 files changed, 28 insertions, 2 deletions
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi
index 883018f1..0298dfde 100644
--- a/doc/microhttpd.texi
+++ b/doc/microhttpd.texi
@@ -1287,11 +1287,37 @@ header information and then it can be used any number of times.
1287 1287
1288@table @var 1288@table @var
1289@item size 1289@item size
1290size of the data portion of the response, @code{-1} for unknown; 1290size of the data portion of the response (should be smaller or equal to the
1291size of the file)
1292
1293@item fd
1294file descriptor referring to a file on disk with the data; will be
1295closed when response is destroyed; note that 'fd' must be an actual
1296file descriptor (not a pipe or socket) since MHD might use 'sendfile'
1297or 'seek' on it
1298@end table
1299
1300Return @mynull{} on error (i.e. invalid arguments, out of memory).
1301@end deftypefun
1302
1303
1304@deftypefun {struct MHD_Response *} MHD_create_response_from_fd_at_offset (uint64_t size, int fd, off_t offset)
1305Create a response object. The response object can be extended with
1306header information and then it can be used any number of times.
1307
1308@table @var
1309@item size
1310size of the data portion of the response (number of bytes to transmit from the
1311file starting at offset).
1291 1312
1292@item fd 1313@item fd
1293file descriptor referring to a file on disk with the data; will be 1314file descriptor referring to a file on disk with the data; will be
1294closed when response is destroyed 1315closed when response is destroyed; note that 'fd' must be an actual
1316file descriptor (not a pipe or socket) since MHD might use 'sendfile'
1317or 'seek' on it
1318
1319@item offset
1320offset to start reading from in the file
1295@end table 1321@end table
1296 1322
1297Return @mynull{} on error (i.e. invalid arguments, out of memory). 1323Return @mynull{} on error (i.e. invalid arguments, out of memory).