diff options
author | Stefan Eissing <icing@apache.org> | 2023-06-20 14:01:09 +0200 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2023-06-20 14:01:09 +0200 |
commit | 3ed9d65b05184f8859d9d37654c54a0d00ef0a96 (patch) | |
tree | 46e9fd75f8a294b0463b238d4b2793499d8ed65f /include | |
parent | stealing numbers (diff) | |
download | apache2-3ed9d65b05184f8859d9d37654c54a0d00ef0a96.tar.xz apache2-3ed9d65b05184f8859d9d37654c54a0d00ef0a96.zip |
*) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as
described in RFC 8441. A new directive 'H2WebSockets on|off' has been
added. The feature is by default not enabled.
As also discussed in the manual, this feature should work for setups
using "ProxyPass backend-url upgrade=websocket" without further changes.
Special server modules for WebSockets will have to be adapted,
most likely, as the handling if IO events is different with HTTP/2.
HTTP/2 WebSockets are supported on platforms with native pipes. This
excludes Windows.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/http_core.h | 25 |
2 files changed, 27 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index b7acf6e4bf..59af7ae082 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -718,6 +718,7 @@ * 20211221.13 (2.5.1-dev) Add hook token_checker to check for authorization other * than username / password. Add autht_provider structure. * 20211221.14 (2.5.1-dev) Add request_rec->final_resp_passed bit + * 20211221.15 (2.5.1-dev) Add ap_get_pollfd_from_conn() */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -725,7 +726,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20211221 #endif -#define MODULE_MAGIC_NUMBER_MINOR 14 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 15 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/http_core.h b/include/http_core.h index 8610c98742..7c4f166e09 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" @@ -1109,6 +1110,30 @@ AP_DECLARE(int) ap_state_query(int query_code); */ AP_CORE_DECLARE(conn_rec *) ap_create_slave_connection(conn_rec *c); +/** 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); /** Macro to provide a default value if the pointer is not yet initialised */ |