All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mod_http2.h File Reference

Go to the source code of this file.


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)


char * http2_var_lookup (apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)
int http2_is_h2 (conn_rec *)
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)
void http2_get_num_workers (server_rec *s, int *minw, int *max)

Typedef Documentation

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)

Initialize a h2_req_engine. The structure will be passed in but only the name and master are set. The function should initialize all fields.

enginethe allocated, partially filled structure
rthe first request to process, or NULL

Function Documentation

void http2_get_num_workers ( server_rec s,
int minw,
int max 
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.

void http2_req_engine_done ( h2_req_engine engine,
conn_rec rconn,
apr_status_t  status 
apr_status_t http2_req_engine_pull ( h2_req_engine engine,
apr_read_type_e  block,
int  capacity,
request_rec **  pr 

Get a new request for processing in this engine.

enginethe engine which is done processing the slave
blockif call should block waiting for request to come
capacityhow many parallel requests are acceptable
prthe request that needs processing or NULL
APR_SUCCESS if new request was assigned APR_EAGAIN if no new request is available APR_EOF if engine may shut down, as no more request will be scheduled APR_ECONNABORTED if the engine needs to shut down immediately
apr_status_t http2_req_engine_push ( const char *  engine_type,
request_rec r,
http2_req_engine_init einit 

Push a request to an engine with the specified name for further processing. If no such engine is available, einit is not NULL, einit is called with a new engine record and the caller is responsible for running the new engine instance.

engine_typethe type of the engine to add the request to
rthe request to push to an engine for processing
einitan optional initialization callback for a new engine of the requested type, should no instance be available. By passing a non-NULL callback, the caller is willing to init and run a new engine itself.
APR_SUCCESS iff slave was successfully added to an engine
char* http2_var_lookup ( apr_pool_t ,
server_rec ,
conn_rec ,
request_rec ,
char *   

The http2_var_lookup() optional function retrieves HTTP2 environment variables.