Apache2
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

char * http2_var_lookup (apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)
 
int http2_is_h2 (conn_rec *)
 
void http2_get_num_workers (server_rec *s, int *minw, int *max)
 
apr_status_t http2_get_pollfd_from_conn (conn_rec *c, struct apr_pollfd_t *pfd, apr_interval_time_t *ptimeout)
 
apr_status_t http2_req_engine_push (const char *engine_type, request_rec *r, http2_req_engine_init *einit)
 
apr_status_t http2_req_engine_pull (h2_req_engine *engine, apr_read_type_e block, int capacity, request_rec **pr)
 
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

Typedef Documentation

◆ h2_req_engine

typedef struct h2_req_engine h2_req_engine

◆ http2_output_consumed

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

◆ http2_req_engine_init

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)

Function Documentation

◆ http2_get_num_workers()

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

◆ http2_get_pollfd_from_conn()

apr_status_t http2_get_pollfd_from_conn ( conn_rec c,
struct apr_pollfd_t pfd,
apr_interval_time_t ptimeout 
)

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.

◆ http2_is_h2()

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.

◆ http2_req_engine_done()

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

◆ http2_req_engine_pull()

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

◆ http2_req_engine_push()

apr_status_t http2_req_engine_push ( const char *  engine_type,
request_rec r,
http2_req_engine_init einit 
)

◆ http2_var_lookup()

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

The http2_var_lookup() optional function retrieves HTTP2 environment variables.