/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
#ifndef __mod_h2__h2__ #define __mod_h2__h2__
#include <apr_version.h> #include <ap_mmn.h>
#include <nghttp2/nghttp2ver.h>
struct h2_session; struct h2_stream;
/* * When apr pollsets can poll file descriptors (e.g. pipes), * we use it for polling stream input/output.
*/ #ifdef H2_NO_PIPES #define H2_USE_PIPES 0 #else #define H2_USE_PIPES (APR_FILES_AS_SOCKETS && APR_VERSION_AT_LEAST(1,6,0)) #endif
typedefenum {
H2_SESSION_ST_INIT, /* send initial SETTINGS, etc. */
H2_SESSION_ST_DONE, /* finished, connection close */
H2_SESSION_ST_IDLE, /* nothing to write, expecting data inc */
H2_SESSION_ST_BUSY, /* read/write without stop */
H2_SESSION_ST_WAIT, /* waiting for c1 incoming + c2s output */
H2_SESSION_ST_CLEANUP, /* pool is being cleaned up */
} h2_session_state;
typedefstruct h2_session_props { int accepted_max; /* the highest remote stream id was/will be handled */ int completed_max; /* the highest remote stream completed */ int emitted_count; /* the number of local streams sent */ int emitted_max; /* the highest local stream id sent */ int error; /* the last session error encountered */ constchar *error_msg; /* the short message given on the error */ unsignedint accepting : 1; /* if the session is accepting new streams */ unsignedint shutdown : 1; /* if the final GOAWAY has been sent */
} h2_session_props;
/* h2_request is the transformer of HTTP2 streams into HTTP/1.1 internal * format that will be fed to various httpd input filters to finally * become a request_rec to be handled by soemone.
*/ typedefstruct h2_request h2_request; struct h2_request { constchar *method; /* pseudo header values, see ch. 8.1.2.3 */ constchar *scheme; constchar *authority; constchar *path; constchar *protocol;
apr_table_t *headers;
apr_time_t request_time;
apr_off_t raw_bytes; /* RAW network bytes that generated this request - if known. */ int http_status; /* Store a possible HTTP status code that gets * defined before creating the dummy HTTP/1.1 * request e.g. due to an error already * detected.
*/
};
/* * A possible HTTP status code is not defined yet. See the http_status field * in struct h2_request above for further explanation.
*/ #define H2_HTTP_STATUS_UNSET (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.