diff options
Diffstat (limited to 'doc/microhttpd.texi')
-rw-r--r-- | doc/microhttpd.texi | 30 |
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 |
1290 | size of the data portion of the response, @code{-1} for unknown; | 1290 | size of the data portion of the response (should be smaller or equal to the |
1291 | size of the file) | ||
1292 | |||
1293 | @item fd | ||
1294 | file descriptor referring to a file on disk with the data; will be | ||
1295 | closed when response is destroyed; note that 'fd' must be an actual | ||
1296 | file descriptor (not a pipe or socket) since MHD might use 'sendfile' | ||
1297 | or 'seek' on it | ||
1298 | @end table | ||
1299 | |||
1300 | Return @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) | ||
1305 | Create a response object. The response object can be extended with | ||
1306 | header information and then it can be used any number of times. | ||
1307 | |||
1308 | @table @var | ||
1309 | @item size | ||
1310 | size of the data portion of the response (number of bytes to transmit from the | ||
1311 | file starting at offset). | ||
1291 | 1312 | ||
1292 | @item fd | 1313 | @item fd |
1293 | file descriptor referring to a file on disk with the data; will be | 1314 | file descriptor referring to a file on disk with the data; will be |
1294 | closed when response is destroyed | 1315 | closed when response is destroyed; note that 'fd' must be an actual |
1316 | file descriptor (not a pipe or socket) since MHD might use 'sendfile' | ||
1317 | or 'seek' on it | ||
1318 | |||
1319 | @item offset | ||
1320 | offset to start reading from in the file | ||
1295 | @end table | 1321 | @end table |
1296 | 1322 | ||
1297 | Return @mynull{} on error (i.e. invalid arguments, out of memory). | 1323 | Return @mynull{} on error (i.e. invalid arguments, out of memory). |