libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 23b0752b1dd4b67a0ea7e1bb06923e73d0509061
parent 6722cf7dd0089991d425ca882c373c34b36ae45e
Author: ng0 <ng0@n0.is>
Date:   Sun, 21 Jul 2019 15:55:16 +0000

doxygen for _send2

Diffstat:
Msrc/microhttpd/mhd_send.c | 26++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -311,14 +311,23 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, } -// * Send header followed by buffer on connection; -// * uses writev if possible to send both at once -// * returns the sum of the number of bytes sent from -// * both buffers, or -1 on error; -// * if writev is -// unavailable, this call MUST only send from 'header' -// (as we cannot handle the case that the first write -// succeeds and the 2nd fails!). +/** + * Send header followed by buffer on connection. + * Uses writev if possible to send both at once + * and returns the sum of the number of bytes sent from + * both buffers, or -1 on error; + * if writev is unavailable, this call MUST only send from 'header' + * (as we cannot handle the case that the first write + * succeeds and the 2nd fails!). + * + * @param connection the MHD_Connection structure + * @param header content of header to send + * @param header_size the size of the header (in bytes) + * @param buffer content of the buffer to send + * @param buffer_size the size of the buffer (in bytes) + * @return sum of the number of bytes sent from both buffers or + -1 on error + */ ssize_t MHD_send_on_connection2_ (struct MHD_Connection *connection, const char *header, @@ -364,6 +373,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, vector[1].iov_len = strlen (buffer); iovcnt = sizeof (vector) / sizeof (struct iovec); ret = writev (connection->socket_fd, vector, iovcnt); + #if TCP_CORK if (use_corknopush) {