aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-26 23:34:20 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-02-26 23:46:51 +0300
commitdd2d724c197d6fb5c3d676ae786763190ef278c5 (patch)
tree6110ca2562bb737820dc21cd29e1910a1674a9e7 /src/microhttpd/internal.h
parent3edd4bfa7f87f5970fc701b0772eeadc2f076df9 (diff)
downloadlibmicrohttpd-dd2d724c197d6fb5c3d676ae786763190ef278c5.tar.gz
libmicrohttpd-dd2d724c197d6fb5c3d676ae786763190ef278c5.zip
Reworked handling "already ready" situations:
* busy-waiting for write if TLS connection is in MHD_EVENT_LOOP_INFO_WRITE mode and data is pending in TLS buffers * removed calculation of number of TLS read-ready connections * simplified and unified processing if any connection is in MHD_EVENT_LOOP_INFO_BLOCK mode
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 4f2eac38..4979474b 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1452,6 +1452,17 @@ struct MHD_Daemon
1452 bool resuming; 1452 bool resuming;
1453 1453
1454 /** 1454 /**
1455 * 'True' if some data is already waiting to be processed.
1456 * If set to 'true' - zero timeout for select()/poll*()
1457 * is used.
1458 * Should be reset each time before processing connections
1459 * and raised by any connection which require additional
1460 * immediately processing (application does not provide
1461 * data for response, data waiting in TLS buffers etc.)
1462 */
1463 bool data_already_pending;
1464
1465 /**
1455 * Number of active parallel connections. 1466 * Number of active parallel connections.
1456 */ 1467 */
1457 unsigned int connections; 1468 unsigned int connections;
@@ -1559,20 +1570,6 @@ struct MHD_Daemon
1559 */ 1570 */
1560 bool have_dhparams; 1571 bool have_dhparams;
1561 1572
1562 /**
1563 * For how many connections do we have 'tls_read_ready' set to MHD_YES?
1564 * Used to avoid O(n) traversal over all connections when determining
1565 * event-loop timeout (as it needs to be zero if there is any connection
1566 * which might have ready data within TLS).
1567 */
1568 unsigned int num_tls_read_ready;
1569
1570 /**
1571 * Indicate that some TLS connection(s) have received data pending in
1572 * TLS buffers.
1573 */
1574 bool has_tls_recv_ready;
1575
1576#endif /* HTTPS_SUPPORT */ 1573#endif /* HTTPS_SUPPORT */
1577 1574
1578#ifdef DAUTH_SUPPORT 1575#ifdef DAUTH_SUPPORT