/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
/** *Callbackstructureforeventsandstreamstatetransisitions
*/ typedefstruct h2_stream_monitor { void *ctx;
h2_stream_state_cb *on_state_enter; /* called when a state is entered */
h2_stream_state_cb *on_state_invalid; /* called when an invalid state change
was detected */
h2_stream_event_cb *on_state_event; /* called right before the given event
result in a new stream state */
h2_stream_event_cb *on_event; /* called for events that do not
trigger a state change */
} h2_stream_monitor;
#define H2_STRM_ASSIGN_MAGIC(s,m) ((s)->magic = m) #define H2_STRM_ASSERT_MAGIC(s,m) ap_assert((s)->magic == m) #else #define H2_STRM_ASSIGN_MAGIC(s,m) ((void)0) #define H2_STRM_ASSERT_MAGIC(s,m) ((void)0) #endif
struct h2_stream { #ifdef AP_DEBUG
uint32_t magic; #endif int id; /* http2 stream identifier */ int initiated_on; /* initiating stream id (PUSH) or 0 */
apr_pool_t *pool; /* the memory pool for this stream */ struct h2_session *session; /* the session this stream belongs to */
h2_stream_state_t state; /* state of this stream */
apr_time_t created; /* when stream was created */
conststruct h2_request *request; /* the request made in this stream */ struct h2_request *rtmp; /* request being assembled */
apr_table_t *trailers_in; /* optional, incoming trailers */ int request_headers_added; /* number of request headers added */ int request_headers_failed; /* number of request headers failed to add */
#if AP_HAS_RESPONSE_BUCKETS
ap_bucket_response *response; /* the final, non-interim response or NULL */ #else struct h2_headers *response; /* the final, non-interim response or NULL */ #endif
struct h2_bucket_beam *input;
apr_bucket_brigade *in_buffer; int in_window_size;
apr_time_t in_last_write;
int rst_error; /* stream error for RST_STREAM */ unsignedint aborted : 1; /* was aborted */ unsignedint scheduled : 1; /* stream has been scheduled */ unsignedint input_closed : 1; /* no more request data/trailers coming */ unsignedint push_policy; /* which push policy to use for this request */ unsignedint sent_trailers : 1; /* trailers have been submitted */ unsignedint output_eos : 1; /* output EOS in buffer/sent */
conn_rec *c2; /* connection processing stream */
const h2_priority *pref_priority; /* preferred priority for this stream */
apr_off_t out_frames; /* # of frames sent out */
apr_off_t out_frame_octets; /* # of RAW frame octets sent out */
apr_off_t out_data_frames; /* # of DATA frames sent */
apr_off_t out_data_octets; /* # of DATA octets (payload) sent */
apr_off_t in_data_frames; /* # of DATA frames received */
apr_off_t in_data_octets; /* # of DATA octets (payload) received */
apr_off_t in_trailer_octets; /* # of HEADER octets (payload) received in trailers */
h2_stream_monitor *monitor; /* optional monitor for stream states */
};
/* End the construction of request headers */
apr_status_t h2_stream_end_headers(h2_stream *stream, int eos, size_t raw_bytes);
apr_status_t h2_stream_send_frame(h2_stream *stream, int frame_type, int flags, size_t frame_len);
apr_status_t h2_stream_recv_frame(h2_stream *stream, int frame_type, int flags, size_t frame_len);
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.