#include <apr_queue.h>
#include "h2_workers.h"
Go to the source code of this file.
|
| apr_status_t | h2_mplx_c1_child_init (apr_pool_t *pool, server_rec *s) |
| |
| h2_mplx * | h2_mplx_c1_create (int child_id, apr_uint32_t id, struct h2_stream *stream0, server_rec *s, apr_pool_t *master, struct h2_workers *workers) |
| |
| void | h2_mplx_c1_destroy (h2_mplx *m) |
| |
| int | h2_mplx_c1_shutdown (h2_mplx *m) |
| |
| apr_status_t | h2_mplx_c1_stream_cleanup (h2_mplx *m, struct h2_stream *stream, unsigned int *pstream_count) |
| |
| int | h2_mplx_c1_stream_is_running (h2_mplx *m, struct h2_stream *stream) |
| |
| void | h2_mplx_c1_process (h2_mplx *m, struct h2_iqueue *read_to_process, h2_stream_get_fn *get_stream, h2_stream_pri_cmp_fn *cmp, struct h2_session *session, unsigned int *pstream_count) |
| |
| apr_status_t | h2_mplx_c1_reprioritize (h2_mplx *m, h2_stream_pri_cmp_fn *cmp, struct h2_session *session) |
| |
| apr_status_t | h2_mplx_c1_poll (h2_mplx *m, apr_interval_time_t timeout, stream_ev_callback *on_stream_input, stream_ev_callback *on_stream_output, void *on_ctx) |
| |
| void | h2_mplx_c2_input_read (h2_mplx *m, conn_rec *c2) |
| |
| void | h2_mplx_c2_output_written (h2_mplx *m, conn_rec *c2) |
| |
| apr_status_t | h2_mplx_c1_streams_do (h2_mplx *m, h2_mplx_stream_cb *cb, void *ctx) |
| |
| int | h2_mplx_c1_all_streams_want_send_data (h2_mplx *m) |
| |
| apr_status_t | h2_mplx_c1_client_rst (h2_mplx *m, int stream_id, struct h2_stream *stream) |
| |
| const struct h2_stream * | h2_mplx_c2_stream_get (h2_mplx *m, int stream_id) |
| |
| apr_status_t | h2_mplx_worker_pop_c2 (h2_mplx *m, conn_rec **out_c2) |
| |
| void | h2_mplx_c1_going_keepalive (h2_mplx *m) |
| |
◆ H2_MPLX_MSG
◆ h2_c2_transit
◆ h2_mplx
◆ h2_mplx_stream_cb
◆ stream_ev_callback
◆ h2_mplx_c1_all_streams_want_send_data()
| int h2_mplx_c1_all_streams_want_send_data |
( |
h2_mplx * |
m | ) |
|
Return != 0 iff all open streams want to send data
Definition at line 411 of file h2_mplx.c.
◆ h2_mplx_c1_child_init()
◆ h2_mplx_c1_client_rst()
A stream has been RST_STREAM by the client. Abort any processing going on and remove from processing queue.
Definition at line 1122 of file h2_mplx.c.
◆ h2_mplx_c1_create()
Create the multiplexer for the given HTTP2 session. Implicitly has reference count 1.
A h2_mplx needs to be thread-safe and if will be called by the h2_session thread and the h2_worker threads. Therefore:
- calls are protected by a mutex lock, m->lock
- the pool needs its own allocator, since apr_allocator_t are not re-entrant. The separate allocator works without a separate lock since we already protect h2_mplx itself. Since HTTP/2 connections can be expected to live longer than their HTTP/1 cousins, the separate allocator seems to work better than protecting a shared h2_session one with an own lock.
Definition at line 258 of file h2_mplx.c.
◆ h2_mplx_c1_destroy()
| void h2_mplx_c1_destroy |
( |
h2_mplx * |
m | ) |
|
Destroy the mplx, shutting down all ongoing processing.
- Parameters
-
| m | the mplx destroyed |
| wait | condition var to wait on for ref counter == 0 |
Definition at line 471 of file h2_mplx.c.
◆ h2_mplx_c1_going_keepalive()
| void h2_mplx_c1_going_keepalive |
( |
h2_mplx * |
m | ) |
|
Session processing is entering KEEPALIVE, e.g. giving control to the MPM for monitoring incoming socket events only. Last chance for maintenance work before losing control.
Definition at line 605 of file h2_mplx.c.
◆ h2_mplx_c1_poll()
Poll the primary connection for input and the active streams for output. Invoke the callback for any stream where an event happened.
Definition at line 614 of file h2_mplx.c.
◆ h2_mplx_c1_process()
Process a stream request.
- Parameters
-
| m | the multiplexer |
| read_to_process | |
| input_pending | |
| cmp | the stream priority compare function |
| pstream_count | on return the number of streams active in mplx |
Definition at line 711 of file h2_mplx.c.
◆ h2_mplx_c1_reprioritize()
Stream priorities have changed, reschedule pending requests.
- Parameters
-
| m | the multiplexer |
| cmp | the stream priority compare function |
| ctx | context data for the compare function |
Definition at line 643 of file h2_mplx.c.
◆ h2_mplx_c1_shutdown()
Shut down the multiplexer gracefully. Will no longer schedule new streams but let the ongoing ones finish normally.
- Returns
- the highest stream id being/been processed
Definition at line 358 of file h2_mplx.c.
◆ h2_mplx_c1_stream_cleanup()
Notifies mplx that a stream has been completely handled on the main connection and is ready for cleanup.
- Parameters
-
| m | the mplx itself |
| stream | the stream ready for cleanup |
| pstream_count | return the number of streams active |
Definition at line 549 of file h2_mplx.c.
◆ h2_mplx_c1_stream_is_running()
◆ h2_mplx_c1_streams_do()
Iterate over all streams known to mplx from the primary connection.
- Parameters
-
| m | the mplx |
| cb | the callback to invoke on each stream |
| ctx | userdata passed to the callback |
Definition at line 383 of file h2_mplx.c.
◆ h2_mplx_c2_input_read()
◆ h2_mplx_c2_output_written()
◆ h2_mplx_c2_stream_get()
Get readonly access to a stream for a secondary connection.
Definition at line 562 of file h2_mplx.c.
◆ h2_mplx_worker_pop_c2()
A h2 worker asks for a secondary connection to process.
- Parameters
-
| out_c2 | non-NULL, a pointer where to reveive the next secondary connection to process. |