aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-07-21 15:55:16 +0000
committerng0 <ng0@n0.is>2019-07-21 15:55:16 +0000
commit23b0752b1dd4b67a0ea7e1bb06923e73d0509061 (patch)
treec6378d0d0003f472b4fbddb1d0d26afd789b5db4 /src/microhttpd
parent6722cf7dd0089991d425ca882c373c34b36ae45e (diff)
downloadlibmicrohttpd-23b0752b1dd4b67a0ea7e1bb06923e73d0509061.tar.gz
libmicrohttpd-23b0752b1dd4b67a0ea7e1bb06923e73d0509061.zip
doxygen for _send2
Diffstat (limited to 'src/microhttpd')
-rw-r--r--src/microhttpd/mhd_send.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 40e5ef11..705ca84c 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -311,14 +311,23 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
311} 311}
312 312
313 313
314// * Send header followed by buffer on connection; 314/**
315// * uses writev if possible to send both at once 315 * Send header followed by buffer on connection.
316// * returns the sum of the number of bytes sent from 316 * Uses writev if possible to send both at once
317// * both buffers, or -1 on error; 317 * and returns the sum of the number of bytes sent from
318// * if writev is 318 * both buffers, or -1 on error;
319// unavailable, this call MUST only send from 'header' 319 * if writev is unavailable, this call MUST only send from 'header'
320// (as we cannot handle the case that the first write 320 * (as we cannot handle the case that the first write
321// succeeds and the 2nd fails!). 321 * succeeds and the 2nd fails!).
322 *
323 * @param connection the MHD_Connection structure
324 * @param header content of header to send
325 * @param header_size the size of the header (in bytes)
326 * @param buffer content of the buffer to send
327 * @param buffer_size the size of the buffer (in bytes)
328 * @return sum of the number of bytes sent from both buffers or
329 -1 on error
330 */
322ssize_t 331ssize_t
323MHD_send_on_connection2_ (struct MHD_Connection *connection, 332MHD_send_on_connection2_ (struct MHD_Connection *connection,
324 const char *header, 333 const char *header,
@@ -364,6 +373,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
364 vector[1].iov_len = strlen (buffer); 373 vector[1].iov_len = strlen (buffer);
365 iovcnt = sizeof (vector) / sizeof (struct iovec); 374 iovcnt = sizeof (vector) / sizeof (struct iovec);
366 ret = writev (connection->socket_fd, vector, iovcnt); 375 ret = writev (connection->socket_fd, vector, iovcnt);
376
367#if TCP_CORK 377#if TCP_CORK
368 if (use_corknopush) 378 if (use_corknopush)
369 { 379 {