Apache HTTPD
Macros | Typedefs | Functions
mod_http2.h File Reference

Go to the source code of this file.

Macros

#define AP_HTTP2_HAS_GET_POLLFD
 

Typedefs

typedef struct h2_req_engine h2_req_engine
 
typedef void http2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed)
 
typedef apr_status_t http2_req_engine_init(h2_req_engine *engine, const char *id, const char *type, apr_pool_t *pool, apr_size_t req_buffer_size, request_rec *r, http2_output_consumed **pconsumed, void **pbaton)
 

Functions

 APR_DECLARE_OPTIONAL_FN (char *, http2_var_lookup,(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *))
 
 APR_DECLARE_OPTIONAL_FN (int, http2_is_h2,(conn_rec *))
 
 APR_DECLARE_OPTIONAL_FN (void, http2_get_num_workers,(server_rec *s, int *minw, int *max))
 
 APR_DECLARE_OPTIONAL_FN (apr_status_t, http2_get_pollfd_from_conn,(conn_rec *c, struct apr_pollfd_t *pfd, apr_interval_time_t *ptimeout))
 
 APR_DECLARE_OPTIONAL_FN (apr_status_t, http2_req_engine_push,(const char *engine_type, request_rec *r, http2_req_engine_init *einit))
 
 APR_DECLARE_OPTIONAL_FN (apr_status_t, http2_req_engine_pull,(h2_req_engine *engine, apr_read_type_e block, int capacity, request_rec **pr))
 
 APR_DECLARE_OPTIONAL_FN (void, http2_req_engine_done,(h2_req_engine *engine, conn_rec *rconn, apr_status_t status))
 

Macro Definition Documentation

◆ AP_HTTP2_HAS_GET_POLLFD

#define AP_HTTP2_HAS_GET_POLLFD

Definition at line 35 of file mod_http2.h.

Typedef Documentation

◆ h2_req_engine

Definition at line 70 of file mod_http2.h.

◆ http2_output_consumed

typedef void http2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed)

Definition at line 71 of file mod_http2.h.

◆ http2_req_engine_init

Definition at line 73 of file mod_http2.h.

Function Documentation

◆ APR_DECLARE_OPTIONAL_FN() [1/7]

Get a apr_pollfd_t populated for a h2 connection where (c->master != NULL) is true and pipes are supported. To be used in Apache modules implementing WebSockets in Apache httpd versions that do not support the corresponding ap_get_pollfd_from_conn() function. When available, use ap_get_pollfd_from_conn() instead of this function.

How it works: pass in a apr_pollfd_t which gets populated for monitoring the input of connection c. If c is not a HTTP/2 stream connection, the function will return APR_ENOTIMPL. ptimeout is optional and, if passed, will get the timeout in effect

On platforms without support for pipes (e.g. Windows), this function will return APR_ENOTIMPL.

◆ APR_DECLARE_OPTIONAL_FN() [2/7]

APR_DECLARE_OPTIONAL_FN ( apr_status_t  ,
http2_req_engine_pull  ,
(h2_req_engine *engine, apr_read_type_e block, int capacity, request_rec **pr  
)

◆ APR_DECLARE_OPTIONAL_FN() [3/7]

◆ APR_DECLARE_OPTIONAL_FN() [4/7]

APR_DECLARE_OPTIONAL_FN ( char ,
http2_var_lookup  ,
(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)   
)

The http2_var_lookup() optional function retrieves HTTP2 environment variables.

◆ APR_DECLARE_OPTIONAL_FN() [5/7]

APR_DECLARE_OPTIONAL_FN ( int  ,
http2_is_h2  ,
(conn_rec *)   
)

An optional function which returns non-zero if the given connection or its master connection is using HTTP/2.

◆ APR_DECLARE_OPTIONAL_FN() [6/7]

APR_DECLARE_OPTIONAL_FN ( void  ,
http2_get_num_workers  ,
(server_rec *s, int *minw, int *max  
)

◆ APR_DECLARE_OPTIONAL_FN() [7/7]

APR_DECLARE_OPTIONAL_FN ( void  ,
http2_req_engine_done  ,
(h2_req_engine *engine, conn_rec *rconn, apr_status_t status  
)