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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __mod_h2__h2_conn__
18 #define __mod_h2__h2_conn__
24 * Setup the connection and our context for HTTP/2 processing
26 * @param c the connection HTTP/2 is starting on
27 * @param r the upgrade request that still awaits an answer, optional
28 * @param s the server selected for this connection (can be != c->base_server)
30 apr_status_t h2_conn_setup(conn_rec *c, request_rec *r, server_rec *s);
33 * Run the HTTP/2 connection in synchronous fashion.
34 * Return when the HTTP/2 session is done
35 * and the connection will close or a fatal error occurred.
37 * @param c the http2 connection to run
38 * @return APR_SUCCESS when session is done.
40 apr_status_t h2_conn_run(conn_rec *c);
43 * The connection is about to close. If we have not send a GOAWAY
44 * yet, this is the last chance.
46 apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c);
48 /* Initialize this child process for h2 connection work,
49 * to be called once during child init before multi processing
52 apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s);
66 /* Returns the type of MPM module detected */
67 h2_mpm_type_t h2_conn_mpm_type(void);
68 const char *h2_conn_mpm_name(void);
69 int h2_mpm_supported(void);
71 conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent);
72 void h2_slave_destroy(conn_rec *slave);
74 apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd);
75 void h2_slave_run_connection(conn_rec *slave);
77 #endif /* defined(__mod_h2__h2_conn__) */