diff options
Diffstat (limited to 'src/microhttpd/mhd_send.h')
-rw-r--r-- | src/microhttpd/mhd_send.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_send.h b/src/microhttpd/mhd_send.h index 54b5c1fe..d4ee8de7 100644 --- a/src/microhttpd/mhd_send.h +++ b/src/microhttpd/mhd_send.h @@ -41,6 +41,11 @@ #include "connection_https.h" #endif +#if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) || \ + defined(MHD_WINSOCK_SOCKETS) +#define MHD_VECT_SEND 1 +#endif /* HAVE_SENDMSG || HAVE_WRITEV || MHD_WINSOCK_SOCKETS */ + #ifdef HAVE_FREEBSD_SENDFILE /** * Initialises static variables @@ -125,4 +130,21 @@ MHD_connection_set_nodelay_state_ (struct MHD_Connection *connection, bool nodelay_state); +/** + * Function for sending responses backed by a an array of memory buffers. + * + * @param connection the MHD connection structure + * @param r_iov the pointer to iov response structure with tracking + * @param push_data set to true to force push the data to the network from + * system buffers (usually set for the last piece of data), + * set to false to prefer holding incomplete network packets + * (more data will be send for the same reply). + * @return actual number of bytes sent + */ +ssize_t +MHD_send_iovec_ (struct MHD_Connection *connection, + struct MHD_iovec_track_ *r_iov, + bool push_data); + + #endif /* MHD_SEND_H */ |