summaryrefslogtreecommitdiffstats
path: root/include/http_core.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:42:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 13:42:57 +0000
commit550d8e8e6ccef95a119bc265101792b0475a7aa0 (patch)
treefdeb0b5ff80273f95ce61607fc3613dff0b9a235 /include/http_core.h
parentAdding upstream version 2.4.57. (diff)
downloadapache2-550d8e8e6ccef95a119bc265101792b0475a7aa0.tar.xz
apache2-550d8e8e6ccef95a119bc265101792b0475a7aa0.zip
Adding upstream version 2.4.59.upstream/2.4.59upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/http_core.h')
-rw-r--r--include/http_core.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/http_core.h b/include/http_core.h
index 15c9bac..948034f 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -31,6 +31,7 @@
#include "apr_optional.h"
#include "util_filter.h"
#include "ap_expr.h"
+#include "apr_poll.h"
#include "apr_tables.h"
#include "http_config.h"
@@ -1060,6 +1061,31 @@ AP_DECLARE(int) ap_state_query(int query_code);
/** only dump some parts of the config */
#define AP_SQ_RM_CONFIG_DUMP 4
+/** Get a apr_pollfd_t populated with descriptor and descriptor type
+ * and the timeout to use for it.
+ * @return APR_ENOTIMPL if not supported for a connection.
+ */
+AP_DECLARE_HOOK(apr_status_t, get_pollfd_from_conn,
+ (conn_rec *c, struct apr_pollfd_t *pfd,
+ apr_interval_time_t *ptimeout))
+
+/**
+ * Pass in a `struct apr_pollfd_t*` and get `desc_type` and `desc`
+ * populated with a suitable value for polling connection input.
+ * For primary connection (c->master == NULL), this will be the connection
+ * socket. For secondary connections this may differ or not be available
+ * at all.
+ * Note that APR_NO_DESC may be set to indicate that the connection
+ * input is already closed.
+ *
+ * @param pfd the pollfd to set the descriptor in
+ * @param ptimeout != NULL to retrieve the timeout in effect
+ * @return ARP_SUCCESS when the information was assigned.
+ */
+AP_CORE_DECLARE(apr_status_t) ap_get_pollfd_from_conn(conn_rec *c,
+ struct apr_pollfd_t *pfd,
+ apr_interval_time_t *ptimeout);
+
#ifdef __cplusplus
}
#endif