Go to the source code of this file.
|
h2_stream * | h2_stream_create (int id, apr_pool_t *pool, struct h2_session *session, h2_stream_monitor *monitor, int initiated_on) |
|
void | h2_stream_destroy (h2_stream *stream) |
|
apr_status_t | h2_stream_prep_processing (h2_stream *stream) |
|
void | h2_stream_set_monitor (h2_stream *stream, h2_stream_monitor *monitor) |
|
void | h2_stream_dispatch (h2_stream *stream, h2_stream_event_t ev) |
|
void | h2_stream_cleanup (h2_stream *stream) |
|
apr_status_t | h2_stream_in_consumed (h2_stream *stream, apr_off_t amount) |
|
void | h2_stream_set_request (h2_stream *stream, const h2_request *r) |
|
apr_status_t | h2_stream_set_request_rec (h2_stream *stream, request_rec *r, int eos) |
|
apr_status_t | h2_stream_add_header (h2_stream *stream, const char *name, size_t nlen, const char *value, size_t vlen) |
|
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) |
|
apr_status_t | h2_stream_recv_DATA (h2_stream *stream, uint8_t flags, const uint8_t *data, size_t len) |
|
apr_status_t | h2_stream_flush_input (h2_stream *stream) |
|
void | h2_stream_rst (h2_stream *stream, int error_code) |
|
int | h2_stream_was_closed (const h2_stream *stream) |
|
apr_status_t | h2_stream_out_prepare (h2_stream *stream, apr_off_t *plen, int *peos, h2_headers **presponse) |
|
apr_status_t | h2_stream_read_to (h2_stream *stream, apr_bucket_brigade *bb, apr_off_t *plen, int *peos) |
|
apr_table_t * | h2_stream_get_trailers (h2_stream *stream) |
|
apr_status_t | h2_stream_submit_pushes (h2_stream *stream, h2_headers *response) |
|
const struct h2_priority * | h2_stream_get_priority (h2_stream *stream, h2_headers *response) |
|
const char * | h2_stream_state_str (h2_stream *stream) |
|
int | h2_stream_is_ready (h2_stream *stream) |
|
#define H2_STREAM_RST |
( |
|
s, |
|
|
|
def |
|
) |
| (s->rst_error? s->rst_error : (def)) |
#define H2_STRM_LOG |
( |
|
aplogno, |
|
|
|
s, |
|
|
|
msg |
|
) |
| aplogno H2_STRM_MSG(s, msg) |
#define H2_STRM_MSG |
( |
|
s, |
|
|
|
msg |
|
) |
| "h2_stream(%ld-%d,%s): "msg, s->session->id, s->id, h2_stream_state_str(s) |
Callback structure for events and stream state transisitions
apr_status_t h2_stream_add_header |
( |
h2_stream * |
stream, |
|
|
const char * |
name, |
|
|
size_t |
nlen, |
|
|
const char * |
value, |
|
|
size_t |
vlen |
|
) |
| |
Cleanup references into requst processing.
- Parameters
-
stream | the stream to cleanup |
Create a stream in H2_SS_IDLE state.
- Parameters
-
id | the stream identifier |
pool | the memory pool to use for this stream |
session | the session this stream belongs to |
monitor | an optional monitor to be called for events and state transisitions |
initiated_on | the id of the stream this one was initiated on (PUSH) |
- Returns
- the newly opened stream
Destroy memory pool if still owned by the stream.
Dispatch (handle) an event on the given stream.
- Parameters
-
stream | the streama the event happened on |
ev | the type of event |
Get priority information set for this stream.
Get optional trailers for this stream, may be NULL. Meaningful results can only be expected when the end of the response body has been reached.
- Parameters
-
stream | to ask for trailers |
- Returns
- trailers for NULL
Notify the stream that amount bytes have been consumed of its input since the last invocation of this method (delta amount).
Determine if stream is ready for submitting a response or a RST
- Parameters
-
stream | the stream to check |
Do a speculative read on the stream output to determine the amount of data that can be read.
- Parameters
-
stream | the stream to speculatively read from |
plen | (in-/out) number of bytes requested and on return amount of bytes that may be read without blocking |
peos | (out) != 0 iff end of stream will be reached when reading plen bytes (out value). |
presponse | (out) the response of one became available |
- Returns
- APR_SUCCESS if out information was computed successfully. APR_EAGAIN if not data is available and end of stream has not been reached yet.
Prepare the stream so that processing may start.
This is the time to allocated resources not needed before.
- Parameters
-
Read a maximum number of bytes into the bucket brigade.
- Parameters
-
stream | the stream to read from |
bb | the brigade to append output to |
plen | (in-/out) max. number of bytes to append and on return actual number of bytes appended to brigade |
peos | (out) != 0 iff end of stream has been reached while reading |
- Returns
- APR_SUCCESS if out information was computed successfully. APR_EAGAIN if not data is available and end of stream has not been reached yet.
Reset the stream. Stream write/reads will return errors afterwards.
- Parameters
-
stream | the stream to reset |
error_code | the HTTP/2 error code |
Set complete stream headers from given h2_request.
- Parameters
-
stream | stream to write request to |
r | the request with all the meta data |
eos | != 0 iff stream input is closed |
Set complete stream header from given request_rec.
- Parameters
-
stream | stream to write request to |
r | the request with all the meta data |
eos | != 0 iff stream input is closed |
const char* h2_stream_state_str |
( |
h2_stream * |
stream | ) |
|
Return a textual representation of the stream state as in RFC 7540 nomenclator, all caps, underscores.
Submit any server push promises on this stream and schedule the tasks connection with these.
- Parameters
-
stream | the stream for which to submit |
Determine if stream was closed already. This is true for states H2_SS_CLOSED, H2_SS_CLEANUP. But not true for H2_SS_CLOSED_L and H2_SS_CLOSED_R.
- Parameters
-
stream | the stream to check on |
- Returns
- != 0 iff stream has been closed