All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
17 #ifndef h2_req_shed_h
18 #define h2_req_shed_h
20 struct h2_req_engine;
21 struct h2_task;
23 typedef struct h2_ngn_shed h2_ngn_shed;
24 struct h2_ngn_shed {
28  void *user_ctx;
30  unsigned int aborted : 1;
33  apr_size_t req_buffer_size; /* preferred buffer size for responses */
34 };
36 const char *h2_req_engine_get_id(h2_req_engine *engine);
40  apr_off_t bytes);
43  const char *id,
44  const char *type,
45  apr_pool_t *pool,
46  apr_size_t req_buffer_size,
47  request_rec *r,
48  h2_output_consumed **pconsumed,
49  void **pbaton);
52  int default_capactiy,
53  apr_size_t req_buffer_size);
57 void h2_ngn_shed_set_ctx(h2_ngn_shed *shed, void *user_ctx);
58 void *h2_ngn_shed_get_ctx(h2_ngn_shed *shed);
62 void h2_ngn_shed_abort(h2_ngn_shed *shed);
64 apr_status_t h2_ngn_shed_push_request(h2_ngn_shed *shed, const char *ngn_type,
65  request_rec *r,
66  h2_shed_ngn_init *init_cb);
69  int capacity,
70  int want_shutdown, request_rec **pr);
73  struct h2_req_engine *ngn,
74  struct h2_task *task);
76 void h2_ngn_shed_done_ngn(h2_ngn_shed *shed, struct h2_req_engine *ngn);
79 #endif /* h2_req_shed_h */
size_t apr_size_t
Definition: apr.h:375
struct h2_req_engine h2_req_engine
Definition: mod_http2.h:38
apr_pool_t * pool
Definition: h2_ngn_shed.h:26
Definition: h2_task.h:53
void h2_ngn_shed_done_ngn(h2_ngn_shed *shed, struct h2_req_engine *ngn)
conn_rec * c
Definition: h2_ngn_shed.h:25
int default_capacity
Definition: h2_ngn_shed.h:32
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:552
unsigned int aborted
Definition: h2_ngn_shed.h:30
void h2_ngn_shed_destroy(h2_ngn_shed *shed)
apr_status_t h2_ngn_shed_push_request(h2_ngn_shed *shed, const char *ngn_type, request_rec *r, h2_shed_ngn_init *init_cb)
void h2_ngn_shed_set_ctx(h2_ngn_shed *shed, void *user_ctx)
apr_status_t h2_ngn_shed_pull_request(h2_ngn_shed *shed, h2_req_engine *pub_ngn, int capacity, int want_shutdown, request_rec **pr)
apr_status_t h2_shed_ngn_init(h2_req_engine *engine, const char *id, const char *type, apr_pool_t *pool, apr_size_t req_buffer_size, request_rec *r, h2_output_consumed **pconsumed, void **pbaton)
Definition: h2_ngn_shed.h:42
Structure to store things which are per connection.
Definition: httpd.h:1124
void h2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed)
Definition: h2_mplx.h:310
void h2_ngn_shed_abort(h2_ngn_shed *shed)
h2_ngn_shed * h2_ngn_shed_create(apr_pool_t *pool, conn_rec *c, int default_capactiy, apr_size_t req_buffer_size)
apr_size_t req_buffer_size
Definition: h2_ngn_shed.h:33
Definition: h2_ngn_shed.h:24
int h2_req_engine_is_shutdown(h2_req_engine *engine)
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
const char * h2_req_engine_get_id(h2_req_engine *engine)
void * h2_ngn_shed_get_ctx(h2_ngn_shed *shed)
void * user_ctx
Definition: h2_ngn_shed.h:28
A structure that represents the current request.
Definition: httpd.h:811
void h2_req_engine_out_consumed(h2_req_engine *engine, conn_rec *c, apr_off_t bytes)
apr_status_t h2_ngn_shed_done_task(h2_ngn_shed *shed, struct h2_req_engine *ngn, struct h2_task *task)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
request_rec * r
Definition: mod_dav.h:515
off_t apr_off_t
Definition: apr.h:377
h2_ngn_shed * h2_ngn_shed_get_shed(struct h2_req_engine *ngn)
apr_hash_t * ngns
Definition: h2_ngn_shed.h:27