Data Structures | Public Member Functions | Data Fields | Friends

HttpTunnel Class Reference

#include <HttpTunnel.h>

Inherits Continuation.

Collaboration diagram for HttpTunnel:
Collaboration graph
[legend]

Data Structures

struct  FlowControl
 Data for implementing flow control across a tunnel.

Public Member Functions

 HttpTunnel ()
void init (HttpSM *sm_arg, ProxyMutex *amutex)
void reset ()
void kill_tunnel ()
bool is_tunnel_active () const
bool is_tunnel_alive () const
bool has_cache_writer () const
void copy_partial_post_data ()
void allocate_redirect_postdata_producer_buffer ()
void allocate_redirect_postdata_buffers (IOBufferReader *ua_reader)
void deallocate_redirect_postdata_buffers ()
HttpTunnelProduceradd_producer (VConnection *vc, int64_t nbytes, IOBufferReader *reader_start, HttpProducerHandler sm_handler, HttpTunnelType_t vc_type, const char *name)
void set_producer_chunking_action (HttpTunnelProducer *p, int64_t skip_bytes, TunnelChunkingAction_t action)
void set_producer_chunking_size (HttpTunnelProducer *producer, int64_t size)
 Set the maximum (preferred) chunk size of chunked output for producer.
HttpTunnelConsumeradd_consumer (VConnection *vc, VConnection *producer, HttpConsumerHandler sm_handler, HttpTunnelType_t vc_type, const char *name, int64_t skip_bytes=0)
int deallocate_buffers ()
DLL< HttpTunnelConsumer > * get_consumers (VConnection *vc)
HttpTunnelProducerget_producer (VConnection *vc)
HttpTunnelConsumerget_consumer (VConnection *vc)
void tunnel_run (HttpTunnelProducer *p=NULL)
int main_handler (int event, void *data)
bool consumer_reenable (HttpTunnelConsumer *c)
bool consumer_handler (int event, HttpTunnelConsumer *c)
bool producer_handler (int event, HttpTunnelProducer *p)
int producer_handler_dechunked (int event, HttpTunnelProducer *p)
int producer_handler_chunked (int event, HttpTunnelProducer *p)
void local_finish_all (HttpTunnelProducer *p)
void chain_finish_all (HttpTunnelProducer *p)
void chain_abort_cache_write (HttpTunnelProducer *p)
void chain_abort_all (HttpTunnelProducer *p)
void abort_cache_write_finish_others (HttpTunnelProducer *p)
void append_message_to_producer_buffer (HttpTunnelProducer *p, const char *msg, int64_t msg_len)
void chain (HttpTunnelConsumer *c, HttpTunnelProducer *p)
 Mark a producer and consumer as the same underlying object.
void close_vc (HttpTunnelProducer *p)
void close_vc (HttpTunnelConsumer *c)

Data Fields

PostDataBufferspostbuf

Friends

class HttpPagesHandler
class CoreUtils

Detailed Description

Definition at line 279 of file HttpTunnel.h.


Constructor & Destructor Documentation

HttpTunnel::HttpTunnel (  ) 

Definition at line 465 of file HttpTunnel.cc.


Member Function Documentation

void HttpTunnel::abort_cache_write_finish_others ( HttpTunnelProducer p  )  [inline]
HttpTunnelConsumer * HttpTunnel::add_consumer ( VConnection vc,
VConnection producer,
HttpConsumerHandler  sm_handler,
HttpTunnelType_t  vc_type,
const char *  name,
int64_t  skip_bytes = 0 
)
HttpTunnelProducer * HttpTunnel::add_producer ( VConnection vc,
int64_t  nbytes,
IOBufferReader reader_start,
HttpProducerHandler  sm_handler,
HttpTunnelType_t  vc_type,
const char *  name 
)
void HttpTunnel::allocate_redirect_postdata_buffers ( IOBufferReader ua_reader  ) 
void HttpTunnel::allocate_redirect_postdata_producer_buffer (  ) 
void HttpTunnel::append_message_to_producer_buffer ( HttpTunnelProducer p,
const char *  msg,
int64_t  msg_len 
) [inline]
void HttpTunnel::chain ( HttpTunnelConsumer c,
HttpTunnelProducer p 
)

Mark a producer and consumer as the same underlying object.

This is use to chain producer/consumer pairs together to indicate the data flows through them sequentially. The primary example is a transform which serves as a consumer on the server side and a producer on the cache/client side.

Parameters:
c Flow goes in here
p Flow comes back out here

Definition at line 704 of file HttpTunnel.cc.

References HttpTunnelProducer::flow_control_source, HttpTunnelProducer::is_throttled(), HttpTunnelConsumer::producer, HttpTunnelProducer::self_consumer, HttpTunnelConsumer::self_producer, and HttpTunnelProducer::set_throttle_src().

Referenced by HttpSM::setup_blind_tunnel(), HttpSM::setup_transfer_from_transform(), HttpSM::setup_transfer_from_transform_to_cache_only(), and HttpSM::setup_transform_to_server_transfer().

void HttpTunnel::chain_abort_all ( HttpTunnelProducer p  ) 
void HttpTunnel::chain_abort_cache_write ( HttpTunnelProducer p  ) 
void HttpTunnel::chain_finish_all ( HttpTunnelProducer p  )  [inline]

Definition at line 425 of file HttpTunnel.h.

void HttpTunnel::close_vc ( HttpTunnelProducer p  ) 
void HttpTunnel::close_vc ( HttpTunnelConsumer c  ) 
bool HttpTunnel::consumer_handler ( int  event,
HttpTunnelConsumer c 
)
bool HttpTunnel::consumer_reenable ( HttpTunnelConsumer c  ) 
void HttpTunnel::copy_partial_post_data (  ) 
int HttpTunnel::deallocate_buffers (  ) 
void HttpTunnel::deallocate_redirect_postdata_buffers (  ) 
HttpTunnelConsumer * HttpTunnel::get_consumer ( VConnection vc  )  [inline]
DLL<HttpTunnelConsumer>* HttpTunnel::get_consumers ( VConnection vc  ) 
HttpTunnelProducer * HttpTunnel::get_producer ( VConnection vc  )  [inline]
bool HttpTunnel::has_cache_writer (  )  const [inline]

Definition at line 510 of file HttpTunnel.h.

References HT_CACHE_WRITE.

Referenced by HttpSM::do_cache_prepare_write_transform().

void HttpTunnel::init ( HttpSM sm_arg,
ProxyMutex amutex 
)
bool HttpTunnel::is_tunnel_active (  )  const [inline]
bool HttpTunnel::is_tunnel_alive (  )  const [inline]

Definition at line 431 of file HttpTunnel.h.

Referenced by main_handler(), HttpSM::tunnel_handler_post_server(), and tunnel_run().

void HttpTunnel::kill_tunnel (  ) 
void HttpTunnel::local_finish_all ( HttpTunnelProducer p  )  [inline]
int HttpTunnel::main_handler ( int  event,
void *  data 
)
bool HttpTunnel::producer_handler ( int  event,
HttpTunnelProducer p 
)
int HttpTunnel::producer_handler_chunked ( int  event,
HttpTunnelProducer p 
)
int HttpTunnel::producer_handler_dechunked ( int  event,
HttpTunnelProducer p 
)
void HttpTunnel::reset (  ) 
void HttpTunnel::set_producer_chunking_action ( HttpTunnelProducer p,
int64_t  skip_bytes,
TunnelChunkingAction_t  action 
)
void HttpTunnel::set_producer_chunking_size ( HttpTunnelProducer producer,
int64_t  size 
)
void HttpTunnel::tunnel_run ( HttpTunnelProducer p = NULL  ) 

Friends And Related Function Documentation

friend class CoreUtils [friend]

Definition at line 282 of file HttpTunnel.h.

friend class HttpPagesHandler [friend]

Definition at line 281 of file HttpTunnel.h.


Field Documentation


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