summaryrefslogtreecommitdiffstats
path: root/modules/http2/h2_proxy_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/http2/h2_proxy_session.h')
-rw-r--r--modules/http2/h2_proxy_session.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/modules/http2/h2_proxy_session.h b/modules/http2/h2_proxy_session.h
index ecebb61..3bc16d7 100644
--- a/modules/http2/h2_proxy_session.h
+++ b/modules/http2/h2_proxy_session.h
@@ -60,10 +60,16 @@ typedef enum {
H2_PROXYS_EV_PRE_CLOSE, /* connection will close after this */
} h2_proxys_event_t;
+typedef enum {
+ H2_PING_ST_NONE, /* normal connection mode, ProxyTimeout rules */
+ H2_PING_ST_AWAIT_ANY, /* waiting for any frame from backend */
+ H2_PING_ST_AWAIT_PING, /* waiting for PING frame from backend */
+} h2_ping_state_t;
typedef struct h2_proxy_session h2_proxy_session;
typedef void h2_proxy_request_done(h2_proxy_session *s, request_rec *r,
- apr_status_t status, int touched);
+ apr_status_t status, int touched,
+ int error_code);
struct h2_proxy_session {
const char *id;
@@ -74,7 +80,6 @@ struct h2_proxy_session {
nghttp2_session *ngh2; /* the nghttp2 session itself */
unsigned int aborted : 1;
- unsigned int check_ping : 1;
unsigned int h2_front : 1; /* if front-end connection is HTTP/2 */
h2_proxy_request_done *done;
@@ -94,6 +99,10 @@ struct h2_proxy_session {
apr_bucket_brigade *input;
apr_bucket_brigade *output;
+
+ h2_ping_state_t ping_state;
+ apr_time_t ping_timeout;
+ apr_time_t save_timeout;
};
h2_proxy_session *h2_proxy_session_setup(const char *id, proxy_conn_rec *p_conn,
@@ -120,9 +129,8 @@ void h2_proxy_session_cancel_all(h2_proxy_session *s);
void h2_proxy_session_cleanup(h2_proxy_session *s, h2_proxy_request_done *done);
-void h2_proxy_session_update_window(h2_proxy_session *s,
- conn_rec *c, apr_off_t bytes);
-
#define H2_PROXY_REQ_URL_NOTE "h2-proxy-req-url"
+int h2_proxy_session_is_reusable(h2_proxy_session *s);
+
#endif /* h2_proxy_session_h */