#include <HttpTunnel.h>
Public Member Functions | |
HttpTunnelProducer () | |
uint64_t | backlog (uint64_t limit=UINT64_MAX) |
Get the largest number of bytes any consumer has not consumed. | |
bool | is_source () const |
Check if producer is original (to ATS) source of data. | |
void | throttle () |
Throttle the flow. | |
void | unthrottle () |
Unthrottle the flow. | |
bool | is_throttled () const |
Check throttled state. | |
void | set_throttle_src (HttpTunnelProducer *srcp) |
Set the flow control source producer for the flow. | |
Data Fields | |
DLL< HttpTunnelConsumer > | consumer_list |
HttpTunnelConsumer * | self_consumer |
VConnection * | vc |
HttpProducerHandler | vc_handler |
VIO * | read_vio |
MIOBuffer * | read_buffer |
IOBufferReader * | buffer_start |
HttpTunnelType_t | vc_type |
ChunkedHandler | chunked_handler |
TunnelChunkingAction_t | chunking_action |
bool | do_chunking |
bool | do_dechunking |
bool | do_chunked_passthru |
int64_t | init_bytes_done |
int64_t | nbytes |
int64_t | ntodo |
int64_t | bytes_read |
int | handler_state |
int | last_event |
Tracking for flow control restarts. | |
int | num_consumers |
bool | alive |
bool | read_success |
HttpTunnelProducer * | flow_control_source |
Flag and pointer for active flow control throttling. | |
const char * | name |
Definition at line 199 of file HttpTunnel.h.
HttpTunnelProducer::HttpTunnelProducer | ( | ) |
Definition at line 392 of file HttpTunnel.cc.
uint64_t HttpTunnelProducer::backlog | ( | uint64_t | limit = UINT64_MAX |
) |
Get the largest number of bytes any consumer has not consumed.
Use limit if you only need to check if the backlog is at least limit.
limit | More than this is irrelevant |
Definition at line 404 of file HttpTunnel.cc.
References backlog(), chunked_handler, ChunkedHandler::chunked_reader, consumer_list, DLL< C, L >::head, HT_TRANSFORM, and IOBufferReader::read_avail().
Referenced by backlog(), and HttpTunnel::consumer_reenable().
bool HttpTunnelProducer::is_source | ( | ) | const [inline] |
Check if producer is original (to ATS) source of data.
true
if this producer is the source of bytes from outside ATS. Definition at line 543 of file HttpTunnel.h.
References HT_CACHE_READ, HT_HTTP_CLIENT, HT_HTTP_SERVER, and vc_type.
Referenced by HttpTunnel::consumer_reenable().
bool HttpTunnelProducer::is_throttled | ( | ) | const [inline] |
Check throttled state.
Definition at line 551 of file HttpTunnel.h.
References flow_control_source.
Referenced by HttpTunnel::chain(), HttpTunnel::consumer_handler(), HttpTunnel::consumer_reenable(), throttle(), and unthrottle().
void HttpTunnelProducer::set_throttle_src | ( | HttpTunnelProducer * | srcp | ) |
Set the flow control source producer for the flow.
This sets the value for this producer and all downstream producers.
throttle
and unthrottle
. srcp | Source producer of flow. |
Definition at line 446 of file HttpTunnel.cc.
References consumer_list, flow_control_source, DLL< C, L >::head, and set_throttle_src().
Referenced by HttpTunnel::chain(), set_throttle_src(), throttle(), and unthrottle().
void HttpTunnelProducer::throttle | ( | ) | [inline] |
Throttle the flow.
Definition at line 557 of file HttpTunnel.h.
References is_throttled(), and set_throttle_src().
Referenced by HttpTunnel::consumer_reenable().
void HttpTunnelProducer::unthrottle | ( | ) | [inline] |
Unthrottle the flow.
Definition at line 564 of file HttpTunnel.h.
References is_throttled(), and set_throttle_src().
Referenced by HttpTunnel::consumer_reenable().
Definition at line 228 of file HttpTunnel.h.
Referenced by HttpTunnel::add_consumer(), HttpTunnel::add_producer(), HttpTunnel::chain_abort_all(), HttpTunnel::close_vc(), HttpTunnel::consumer_handler(), HttpTunnel::consumer_reenable(), HttpSM::handle_server_setup_error(), HttpSM::is_bg_fill_necessary(), HttpTunnel::producer_handler(), HttpSM::tunnel_handler_cache_write(), HttpSM::tunnel_handler_plugin_agent(), HttpSM::tunnel_handler_post_server(), HttpSM::tunnel_handler_ssl_consumer(), HttpSM::tunnel_handler_ssl_producer(), HttpSM::tunnel_handler_transform_write(), and HttpSM::tunnel_handler_ua().
Definition at line 209 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), and HttpTunnel::deallocate_buffers().
int64_t HttpTunnelProducer::bytes_read |
Definition at line 222 of file HttpTunnel.h.
Referenced by HttpTunnel::append_message_to_producer_buffer(), HttpTunnel::chain_abort_all(), HttpTunnel::close_vc(), HttpTunnel::producer_handler(), HttpSM::tunnel_handler_post_ua(), HttpSM::tunnel_handler_ssl_producer(), and HttpSM::tunnel_handler_ua_push().
Definition at line 212 of file HttpTunnel.h.
Referenced by backlog(), HttpTunnel::deallocate_buffers(), HttpSM::is_http_server_eos_truncation(), HttpTunnel::producer_handler_chunked(), HttpTunnel::producer_handler_dechunked(), HttpTunnel::set_producer_chunking_action(), HttpTunnel::set_producer_chunking_size(), HttpSM::tunnel_handler_post_ua(), and HttpSM::tunnel_handler_server().
Definition at line 213 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), and HttpTunnel::set_producer_chunking_action().
Definition at line 203 of file HttpTunnel.h.
Referenced by HttpTunnel::add_consumer(), backlog(), HttpTunnel::chain_abort_all(), HttpTunnel::chain_abort_cache_write(), HttpTunnel::producer_handler(), set_throttle_src(), HttpSM::tunnel_handler_post_or_put(), HttpSM::tunnel_handler_post_ua(), and HttpSM::tunnel_handler_push().
Definition at line 217 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), HttpSM::is_http_server_eos_truncation(), HttpTunnel::producer_handler(), HttpTunnel::producer_handler_chunked(), HttpSM::tunnel_handler_post_ua(), and HttpSM::tunnel_handler_server().
Definition at line 215 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), ChunkedHandler::init(), HttpTunnel::producer_handler(), and HttpTunnel::producer_handler_dechunked().
Definition at line 216 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), ChunkedHandler::init(), HttpSM::is_http_server_eos_truncation(), HttpTunnel::producer_handler(), HttpTunnel::producer_handler_chunked(), HttpSM::tunnel_handler_post_ua(), and HttpSM::tunnel_handler_server().
Flag and pointer for active flow control throttling.
If this is set, it points at the source producer that is under flow control. If NULL
then data flow is not being throttled.
Definition at line 233 of file HttpTunnel.h.
Referenced by HttpTunnel::chain(), HttpTunnel::consumer_reenable(), is_throttled(), and set_throttle_src().
Definition at line 223 of file HttpTunnel.h.
Referenced by HttpSM::handle_server_setup_error(), HttpSM::tunnel_handler_post(), HttpSM::tunnel_handler_post_or_put(), HttpSM::tunnel_handler_post_server(), HttpSM::tunnel_handler_post_ua(), and HttpSM::tunnel_handler_transform_read().
Definition at line 219 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), and HttpSM::tunnel_handler_post_ua().
Tracking for flow control restarts.
Definition at line 224 of file HttpTunnel.h.
Referenced by HttpTunnel::producer_handler(), HttpTunnel::producer_handler_chunked(), and HttpTunnel::producer_handler_dechunked().
const char* HttpTunnelProducer::name |
Definition at line 234 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), HttpTunnel::producer_handler(), HttpTunnel::producer_handler_chunked(), and HttpTunnel::producer_handler_dechunked().
int64_t HttpTunnelProducer::nbytes |
Definition at line 220 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), and HttpTunnel::append_message_to_producer_buffer().
int64_t HttpTunnelProducer::ntodo |
Definition at line 221 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer().
Definition at line 226 of file HttpTunnel.h.
Referenced by HttpTunnel::add_consumer(), HttpSM::is_bg_fill_necessary(), HttpSM::tunnel_handler_cache_write(), HttpSM::tunnel_handler_plugin_agent(), and HttpSM::tunnel_handler_transform_write().
Definition at line 208 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), HttpTunnel::append_message_to_producer_buffer(), HttpTunnel::consumer_handler(), HttpTunnel::consumer_reenable(), HttpTunnel::deallocate_buffers(), HttpSM::handle_server_setup_error(), and HttpSM::tunnel_handler_post_server().
Definition at line 229 of file HttpTunnel.h.
Referenced by HttpTunnel::add_consumer(), HttpTunnel::add_producer(), HttpSM::state_common_wait_for_transform_read(), HttpSM::tunnel_handler_cache_read(), HttpSM::tunnel_handler_post_or_put(), HttpSM::tunnel_handler_post_ua(), HttpSM::tunnel_handler_push(), HttpSM::tunnel_handler_server(), HttpSM::tunnel_handler_transform_read(), and HttpSM::tunnel_handler_ua_push().
Definition at line 207 of file HttpTunnel.h.
Referenced by HttpTunnel::chain_abort_all(), HttpTunnel::close_vc(), HttpTunnel::consumer_handler(), HttpTunnel::consumer_reenable(), HttpTunnel::producer_handler(), HttpSM::tunnel_handler_cache_read(), HttpSM::tunnel_handler_post_ua(), HttpSM::tunnel_handler_server(), HttpSM::tunnel_handler_transform_read(), and HttpSM::tunnel_handler_ua_push().
Definition at line 204 of file HttpTunnel.h.
Referenced by HttpTunnel::chain(), HttpTunnel::chain_abort_all(), HttpTunnel::close_vc(), HttpTunnelConsumer::is_downstream_from(), HttpTunnel::producer_handler(), HttpSM::tunnel_handler_post_server(), HttpSM::tunnel_handler_ssl_consumer(), HttpSM::tunnel_handler_ssl_producer(), HttpSM::tunnel_handler_transform_read(), and HttpSM::tunnel_handler_ua().
Definition at line 205 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), HttpTunnel::chain_abort_all(), HttpTunnel::close_vc(), HttpSM::handle_server_setup_error(), HttpTunnelConsumer::is_downstream_from(), HttpSM::setup_plugin_agents(), HttpSM::tunnel_handler_cache_read(), HttpSM::tunnel_handler_post_server(), HttpSM::tunnel_handler_post_ua(), HttpSM::tunnel_handler_server(), HttpSM::tunnel_handler_ssl_consumer(), HttpSM::tunnel_handler_ssl_producer(), HttpSM::tunnel_handler_transform_read(), HttpSM::tunnel_handler_ua_push(), and HttpTunnel::tunnel_run().
Definition at line 206 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), and HttpTunnel::producer_handler().
Definition at line 210 of file HttpTunnel.h.
Referenced by HttpTunnel::add_producer(), HttpTunnel::chain_abort_all(), is_source(), HttpTunnel::producer_handler(), HttpSM::state_common_wait_for_transform_read(), HttpSM::tunnel_handler_cache_write(), HttpSM::tunnel_handler_post_or_put(), HttpSM::tunnel_handler_post_server(), HttpSM::tunnel_handler_server(), HttpSM::tunnel_handler_ssl_producer(), and HttpSM::tunnel_handler_ua().