|
Packit |
90a5c9 |
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
Packit |
90a5c9 |
* contributor license agreements. See the NOTICE file distributed with
|
|
Packit |
90a5c9 |
* this work for additional information regarding copyright ownership.
|
|
Packit |
90a5c9 |
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
Packit |
90a5c9 |
* (the "License"); you may not use this file except in compliance with
|
|
Packit |
90a5c9 |
* the License. You may obtain a copy of the License at
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
90a5c9 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
90a5c9 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
90a5c9 |
* See the License for the specific language governing permissions and
|
|
Packit |
90a5c9 |
* limitations under the License.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#ifndef __mod_h2__h2_conn__
|
|
Packit |
90a5c9 |
#define __mod_h2__h2_conn__
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
struct h2_ctx;
|
|
Packit |
90a5c9 |
struct h2_task;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Setup the connection and our context for HTTP/2 processing
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* @param ctx the http2 context to setup
|
|
Packit |
90a5c9 |
* @param c the connection HTTP/2 is starting on
|
|
Packit |
90a5c9 |
* @param r the upgrade request that still awaits an answer, optional
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
apr_status_t h2_conn_setup(struct h2_ctx *ctx, conn_rec *c, request_rec *r);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* Run the HTTP/2 connection in synchronous fashion.
|
|
Packit |
90a5c9 |
* Return when the HTTP/2 session is done
|
|
Packit |
90a5c9 |
* and the connection will close or a fatal error occurred.
|
|
Packit |
90a5c9 |
*
|
|
Packit |
90a5c9 |
* @param ctx the http2 context to run
|
|
Packit |
90a5c9 |
* @return APR_SUCCESS when session is done.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/**
|
|
Packit |
90a5c9 |
* The connection is about to close. If we have not send a GOAWAY
|
|
Packit |
90a5c9 |
* yet, this is the last chance.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* Initialize this child process for h2 connection work,
|
|
Packit |
90a5c9 |
* to be called once during child init before multi processing
|
|
Packit |
90a5c9 |
* starts.
|
|
Packit |
90a5c9 |
*/
|
|
Packit |
90a5c9 |
apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
typedef enum {
|
|
Packit |
90a5c9 |
H2_MPM_UNKNOWN,
|
|
Packit |
90a5c9 |
H2_MPM_WORKER,
|
|
Packit |
90a5c9 |
H2_MPM_EVENT,
|
|
Packit |
90a5c9 |
H2_MPM_PREFORK,
|
|
Packit |
90a5c9 |
H2_MPM_MOTORZ,
|
|
Packit |
90a5c9 |
H2_MPM_SIMPLE,
|
|
Packit |
90a5c9 |
H2_MPM_NETWARE,
|
|
Packit |
90a5c9 |
H2_MPM_WINNT,
|
|
Packit |
90a5c9 |
} h2_mpm_type_t;
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
/* Returns the type of MPM module detected */
|
|
Packit |
90a5c9 |
h2_mpm_type_t h2_conn_mpm_type(void);
|
|
Packit |
90a5c9 |
const char *h2_conn_mpm_name(void);
|
|
Packit |
90a5c9 |
int h2_mpm_supported(void);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent);
|
|
Packit |
90a5c9 |
void h2_slave_destroy(conn_rec *slave);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd);
|
|
Packit |
90a5c9 |
void h2_slave_run_connection(conn_rec *slave);
|
|
Packit |
90a5c9 |
|
|
Packit |
90a5c9 |
#endif /* defined(__mod_h2__h2_conn__) */
|