1 /* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef __mod_h2__h2_conn__
17 #define __mod_h2__h2_conn__
23 * Setup the connection and our context for HTTP/2 processing
25 * @param ctx the http2 context to setup
26 * @param c the connection HTTP/2 is starting on
27 * @param r the upgrade request that still awaits an answer, optional
29 apr_status_t h2_conn_setup(struct h2_ctx *ctx, conn_rec *c, request_rec *r);
32 * Run the HTTP/2 connection in synchronous fashion.
33 * Return when the HTTP/2 session is done
34 * and the connection will close or a fatal error occured.
36 * @param ctx the http2 context to run
37 * @return APR_SUCCESS when session is done.
39 apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c);
42 * The connection is about to close. If we have not send a GOAWAY
43 * yet, this is the last chance.
45 apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c);
47 /* Initialize this child process for h2 connection work,
48 * to be called once during child init before multi processing
51 apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s);
65 /* Returns the type of MPM module detected */
66 h2_mpm_type_t h2_conn_mpm_type(void);
69 conn_rec *h2_slave_create(conn_rec *master, apr_pool_t *parent,
70 apr_allocator_t *allocator);
71 void h2_slave_destroy(conn_rec *slave, apr_allocator_t **pallocator);
73 apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd);
74 void h2_slave_run_connection(conn_rec *slave);
76 #endif /* defined(__mod_h2__h2_conn__) */