diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 5 | ||||
-rw-r--r-- | include/http_connection.h | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 84c566e0f0..6457cb21d9 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -702,6 +702,9 @@ * and ap_thread_current() * 20211221.4 (2.5.1-dev) Add hook child_stopped to get informed that a child * has stopped processing any requests. + * 20211221.5 (2.5.1-dev) Add hook create_secondary_connection and method + * ap_create_secondary_connection() to have connection + * setup of http2-like connections in core. * */ @@ -710,7 +713,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20211221 #endif -#define MODULE_MAGIC_NUMBER_MINOR 4 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 5 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/http_connection.h b/include/http_connection.h index 747a84af6e..a89113bcb3 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -151,6 +151,20 @@ AP_DECLARE_HOOK(int,pre_close_connection,(conn_rec *c)) AP_DECLARE(int) ap_pre_connection(conn_rec *c, void *csd); /** + * create_secondary_connection is a RUN_FIRST hook which allows modules to create + * secondary connections. In general, you should not install filters with the + * create_secondary_connection hook. This hook should close the connection + * if it encounters a fatal error condition. + * + * @param p The pool for the secondary connection + * @param master The master connection this belongs to. + * @param alloc The bucket allocator to use for all bucket/brigade creations + * @return An allocated connection record or NULL. + */ +AP_DECLARE_HOOK(conn_rec *, create_secondary_connection, + (apr_pool_t *p, conn_rec *master, apr_bucket_alloc_t *alloc)) + +/** * Create a new server/incoming or client/outgoing/proxy connection * @param p The pool from which to allocate the connection record * @param server The server record to create the connection too. @@ -171,6 +185,17 @@ AP_DECLARE(conn_rec *) ap_create_connection(apr_pool_t *p, apr_bucket_alloc_t *alloc, unsigned int outgoing); +/** + * Create a new secondary connection based on a master one. + * @param pool The pool for the secondary connection + * @param master The master connection this belongs to. + * @param alloc The bucket allocator to use for all bucket/brigade creations + * @return An allocated connection record or NULL. + */ +AP_DECLARE(conn_rec *) ap_create_secondary_connection(apr_pool_t *pool, + conn_rec *master, + apr_bucket_alloc_t *alloc); + /** End Of Connection (EOC) bucket */ AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc; |