Apache HTTPD
h2_bucket_beam.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef h2_bucket_beam_h
18#define h2_bucket_beam_h
19
20#include "h2_conn_ctx.h"
21
24
31
35
43
45 int id;
46 const char *name;
52
55
57 int closed;
58 int tx_mem_limits; /* only memory size counts on transfers */
60
63
64 h2_beam_ev_callback *was_empty_cb; /* event: beam changed to non-empty in h2_beam_send() */
66 h2_beam_ev_callback *recv_cb; /* event: buckets were transfered in h2_beam_receive() */
67 void *recv_ctx;
68 h2_beam_ev_callback *send_cb; /* event: buckets were added in h2_beam_send() */
69 void *send_ctx;
70 h2_beam_ev_callback *eagain_cb; /* event: a receive results in ARP_EAGAIN */
72
73 apr_off_t recv_bytes; /* amount of bytes transferred in h2_beam_receive() */
74 apr_off_t recv_bytes_reported; /* amount of bytes reported as received via callback */
75 h2_beam_io_callback *cons_io_cb; /* report: recv_bytes deltas for sender */
76 void *cons_ctx;
77};
78
96 conn_rec *from,
98 int id, const char *tag,
101
106
111
131
149
154
162
170
176
178
185
199
208 h2_beam_ev_callback *recv_cb, void *ctx);
209
218 h2_beam_ev_callback *eagain_cb, void *ctx);
219
230
240 h2_beam_ev_callback *was_empty_cb, void *ctx);
241
250
255
260
266
267#endif /* h2_bucket_beam_h */
int enabled
apr_read_type_e
Definition apr_buckets.h:57
apr_brigade_flush void * ctx
apr_size_t size
const char int apr_pool_t * pool
Definition apr_cstr.h:84
const apr_array_header_t * list
Definition apr_cstr.h:105
int apr_status_t
Definition apr_errno.h:44
apr_vformatter_buff_t * c
Definition apr_lib.h:175
const void apr_size_t bytes
Definition apr_random.h:91
int to
apr_int64_t apr_interval_time_t
Definition apr_time.h:55
void h2_beam_ev_callback(void *ctx, h2_bucket_beam *beam)
apr_status_t h2_beam_create(h2_bucket_beam **pbeam, conn_rec *from, apr_pool_t *pool, int id, const char *tag, apr_size_t buffer_size, apr_interval_time_t timeout)
void h2_beam_abort(h2_bucket_beam *beam, conn_rec *c)
apr_size_t h2_beam_buffer_size_get(h2_bucket_beam *beam)
void h2_beam_on_received(h2_bucket_beam *beam, h2_beam_ev_callback *recv_cb, void *ctx)
apr_interval_time_t h2_beam_timeout_get(h2_bucket_beam *beam)
void h2_beam_on_eagain(h2_bucket_beam *beam, h2_beam_ev_callback *eagain_cb, void *ctx)
apr_status_t h2_beam_destroy(h2_bucket_beam *beam, conn_rec *c)
void h2_beam_on_send(h2_bucket_beam *beam, h2_beam_ev_callback *on_send_cb, void *ctx)
void h2_beam_on_was_empty(h2_bucket_beam *beam, h2_beam_ev_callback *was_empty_cb, void *ctx)
int h2_beam_empty(h2_bucket_beam *beam)
void h2_beam_timeout_set(h2_bucket_beam *beam, apr_interval_time_t timeout)
void h2_beam_close(h2_bucket_beam *beam, conn_rec *c)
apr_off_t h2_beam_get_mem_used(h2_bucket_beam *beam)
int h2_beam_is_complete(h2_bucket_beam *beam)
apr_status_t h2_beam_send(h2_bucket_beam *beam, conn_rec *from, apr_bucket_brigade *bb, apr_read_type_e block, apr_off_t *pwritten)
void h2_beam_set_copy_files(h2_bucket_beam *beam, int enabled)
int h2_beam_report_consumption(h2_bucket_beam *beam)
void h2_beam_on_consumed(h2_bucket_beam *beam, h2_beam_io_callback *io_cb, void *ctx)
void h2_beam_io_callback(void *ctx, h2_bucket_beam *beam, apr_off_t bytes)
apr_off_t h2_beam_get_buffered(h2_bucket_beam *beam)
void h2_beam_buffer_size_set(h2_bucket_beam *beam, apr_size_t buffer_size)
apr_status_t h2_beam_receive(h2_bucket_beam *beam, conn_rec *to, apr_bucket_brigade *bb, apr_read_type_e block, apr_off_t readbytes)
Structure to store things which are per connection.
Definition httpd.h:1152
APR_RING_HEAD(h2_bucket_list, apr_bucket) list
h2_blist buckets_consumed
apr_pool_t * pool
const char * name
h2_blist buckets_eor
struct apr_thread_cond_t * change
h2_beam_ev_callback * eagain_cb
h2_beam_ev_callback * recv_cb
apr_off_t recv_bytes_reported
h2_beam_ev_callback * send_cb
apr_size_t max_buf_size
apr_off_t recv_bytes
h2_blist buckets_to_send
apr_interval_time_t timeout
h2_beam_io_callback * cons_io_cb
struct apr_thread_mutex_t * lock
h2_beam_ev_callback * was_empty_cb
conn_rec * from
IN ULONG IN INT timeout