| 1 |
'\" t |
| 2 |
.\" Title: ne_set_request_body_buffer |
| 3 |
.\" Author: |
| 4 |
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> |
| 5 |
.\" Date: 3 May 2011 |
| 6 |
.\" Manual: neon API reference |
| 7 |
.\" Source: neon 0.29.6 |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "NE_SET_REQUEST_BODY_" "3" "3 May 2011" "neon 0.29.6" "neon API reference" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
ne_set_request_body_buffer, ne_set_request_body_fd, ne_set_request_body_fd64 \- include a message body with a request |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.ft B |
| 35 |
.nf |
| 36 |
#include <ne_request\&.h> |
| 37 |
.fi |
| 38 |
.ft |
| 39 |
.HP \w'void\ ne_set_request_body_buffer('u |
| 40 |
.BI "void ne_set_request_body_buffer(ne_request\ *" "req" ", const\ char\ *" "buf" ", size_t\ " "count" ");" |
| 41 |
.HP \w'int\ ne_set_request_body_fd('u |
| 42 |
.BI "int ne_set_request_body_fd(ne_request\ *" "req" ", int\ " "fd" ", off_t\ " "begin" ", off_t\ " "length" ");" |
| 43 |
.SH "DESCRIPTION" |
| 44 |
.PP |
| 45 |
The |
| 46 |
\fBne_set_request_body_buffer\fR |
| 47 |
function specifies that a message body should be included with the body, which is stored in the |
| 48 |
\fIcount\fR |
| 49 |
bytes buffer |
| 50 |
\fIbuf\fR\&. |
| 51 |
.PP |
| 52 |
The |
| 53 |
\fBne_set_request_body_fd\fR |
| 54 |
function can be used to include a message body with a request which is read from a file descriptor\&. The body is read from the file descriptor |
| 55 |
\fIfd\fR, which must be a associated with a seekable file (not a pipe, socket, or FIFO)\&. |
| 56 |
\fIcount\fR |
| 57 |
bytes are read, beginning at offset |
| 58 |
\fIbegin\fR |
| 59 |
(hence, passing |
| 60 |
\fIbegin\fR |
| 61 |
as zero means the body is read from the beginning of the file)\&. |
| 62 |
.PP |
| 63 |
For all the above functions, the source of the request body must survive until the request has been dispatched; neither the memory buffer passed to |
| 64 |
\fBne_set_request_body_buffer\fR |
| 65 |
nor the file descriptor passed to |
| 66 |
\fBne_set_request_body_fd\fR |
| 67 |
are copied internally\&. |
| 68 |
.SH "SEE ALSO" |
| 69 |
.PP |
| 70 |
ne_request_create |
| 71 |
.SH "AUTHOR" |
| 72 |
.PP |
| 73 |
\fBJoe Orton\fR <\&[email protected]\&> |
| 74 |
.RS 4 |
| 75 |
Author. |
| 76 |
.RE |
| 77 |
.SH "COPYRIGHT" |
| 78 |
.br |