Public Member Functions | Data Fields

HttpTunnelProducer Struct Reference

#include <HttpTunnel.h>

Collaboration diagram for HttpTunnelProducer:
Collaboration graph
[legend]

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< HttpTunnelConsumerconsumer_list
HttpTunnelConsumerself_consumer
VConnectionvc
HttpProducerHandler vc_handler
VIOread_vio
MIOBufferread_buffer
IOBufferReaderbuffer_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
HttpTunnelProducerflow_control_source
 Flag and pointer for active flow control throttling.
const char * name

Detailed Description

Definition at line 199 of file HttpTunnel.h.


Constructor & Destructor Documentation

HttpTunnelProducer::HttpTunnelProducer (  ) 

Definition at line 392 of file HttpTunnel.cc.


Member Function Documentation

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.

Returns:
The actual backlog or a number at least limit.
Parameters:
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.

Returns:
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.

Note:
This is the implementation for throttle and unthrottle.
See also:
throttle
unthrottle
Parameters:
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().


Field Documentation

Definition at line 209 of file HttpTunnel.h.

Referenced by HttpTunnel::add_producer(), and HttpTunnel::deallocate_buffers().

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 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().

Definition at line 221 of file HttpTunnel.h.

Referenced by HttpTunnel::add_producer().

Definition at line 206 of file HttpTunnel.h.

Referenced by HttpTunnel::add_producer(), and HttpTunnel::producer_handler().


The documentation for this struct was generated from the following files: