#include <PluginVC.h>
Inherits NetVConnection, and PluginIdentity.
Public Member Functions | |
PluginVC (PluginVCCore *core_obj) | |
~PluginVC () | |
virtual VIO * | do_io_read (Continuation *c=NULL, int64_t nbytes=INT64_MAX, MIOBuffer *buf=0) |
virtual VIO * | do_io_write (Continuation *c=NULL, int64_t nbytes=INT64_MAX, IOBufferReader *buf=0, bool owner=false) |
virtual void | do_io_close (int lerrno=-1) |
virtual void | do_io_shutdown (ShutdownHowTo_t howto) |
virtual void | reenable (VIO *vio) |
virtual void | reenable_re (VIO *vio) |
virtual void | set_active_timeout (ink_hrtime timeout_in) |
virtual void | set_inactivity_timeout (ink_hrtime timeout_in) |
virtual void | cancel_active_timeout () |
virtual void | cancel_inactivity_timeout () |
virtual ink_hrtime | get_active_timeout () |
virtual ink_hrtime | get_inactivity_timeout () |
virtual SOCKET | get_socket () |
virtual void | set_local_addr () |
virtual void | set_remote_addr () |
virtual int | set_tcp_init_cwnd (int init_cwnd) |
virtual void | apply_options () |
virtual bool | get_data (int id, void *data) |
virtual bool | set_data (int id, void *data) |
virtual PluginVC * | get_other_side () |
int | main_handler (int event, void *data) |
virtual char const * | getPluginTag () const |
Override for PluginIdentity . | |
virtual int64_t | getPluginId () const |
Override for PluginIdentity . | |
virtual void | setPluginTag (char const *tag) |
Setter for plugin tag. | |
virtual void | setPluginId (int64_t id) |
Setter for plugin id. | |
Friends | |
class | PluginVCCore |
Definition at line 79 of file PluginVC.h.
PluginVC::PluginVC | ( | PluginVCCore * | core_obj | ) |
Definition at line 88 of file PluginVC.cc.
References ink_assert, main_handler(), and SET_HANDLER.
PluginVC::~PluginVC | ( | ) |
Definition at line 99 of file PluginVC.cc.
References Continuation::mutex.
void PluginVC::apply_options | ( | ) | [virtual] |
Definition at line 918 of file PluginVC.cc.
void PluginVC::cancel_active_timeout | ( | ) | [virtual] |
Definition at line 860 of file PluginVC.cc.
References set_active_timeout().
void PluginVC::cancel_inactivity_timeout | ( | ) | [virtual] |
Definition at line 866 of file PluginVC.cc.
References set_inactivity_timeout().
void PluginVC::do_io_close | ( | int | lerrno = -1 |
) | [virtual] |
Definition at line 361 of file PluginVC.cc.
References Debug, ink_assert, Continuation::mutex, MUTEX_TRY_LOCK, PLUGIN_VC_MAGIC_ALIVE, PVC_LOCK_RETRY_TIME, PVC_TYPE, and this_ethread().
Referenced by FetchSM::cleanUp(), and PluginVCCore::kill_no_connect().
VIO * PluginVC::do_io_read | ( | Continuation * | c = NULL , |
|
int64_t | nbytes = INT64_MAX , |
|||
MIOBuffer * | buf = 0 | |||
) | [virtual] |
Definition at line 232 of file PluginVC.cc.
References VIO::_cont, VIO::buffer, MIOBufferAccessor::clear(), Debug, ink_assert, Continuation::mutex, VIO::mutex, VIO::nbytes, VIO::ndone, VIO::op, PLUGIN_VC_MAGIC_ALIVE, PVC_TYPE, VIO::vc_server, PluginVCState::vio, and MIOBufferAccessor::writer_for().
Referenced by FetchSM::httpConnect().
void PluginVC::do_io_shutdown | ( | ShutdownHowTo_t | howto | ) | [virtual] |
Definition at line 391 of file PluginVC.cc.
References ink_assert, IO_SHUTDOWN_READ, IO_SHUTDOWN_READWRITE, IO_SHUTDOWN_WRITE, PLUGIN_VC_MAGIC_ALIVE, and PluginVCState::shutdown.
VIO * PluginVC::do_io_write | ( | Continuation * | c = NULL , |
|
int64_t | nbytes = INT64_MAX , |
|||
IOBufferReader * | buf = 0 , |
|||
bool | owner = false | |||
) | [virtual] |
Definition at line 264 of file PluginVC.cc.
References VIO::_cont, VIO::buffer, MIOBufferAccessor::clear(), Debug, ink_assert, Continuation::mutex, VIO::mutex, VIO::nbytes, VIO::ndone, VIO::op, PLUGIN_VC_MAGIC_ALIVE, PVC_TYPE, MIOBufferAccessor::reader_for(), VIO::vc_server, and PluginVCState::vio.
Referenced by FetchSM::httpConnect().
ink_hrtime PluginVC::get_active_timeout | ( | ) | [virtual] |
Definition at line 872 of file PluginVC.cc.
bool PluginVC::get_data | ( | int | id, | |
void * | data | |||
) | [virtual] |
Definition at line 924 of file PluginVC.cc.
References PLUGIN_VC_ACTIVE, PLUGIN_VC_DATA_LOCAL, and PLUGIN_VC_DATA_REMOTE.
ink_hrtime PluginVC::get_inactivity_timeout | ( | ) | [virtual] |
Definition at line 878 of file PluginVC.cc.
virtual PluginVC* PluginVC::get_other_side | ( | ) | [inline, virtual] |
Definition at line 116 of file PluginVC.h.
Referenced by TSHttpConnectTransparent(), and TSHttpConnectWithPluginId().
SOCKET PluginVC::get_socket | ( | ) | [virtual] |
Definition at line 884 of file PluginVC.cc.
virtual int64_t PluginVC::getPluginId | ( | ) | const [inline, virtual] |
Override for PluginIdentity
.
Reimplemented from PluginIdentity.
Definition at line 122 of file PluginVC.h.
virtual char const* PluginVC::getPluginTag | ( | ) | const [inline, virtual] |
Override for PluginIdentity
.
Reimplemented from PluginIdentity.
Definition at line 120 of file PluginVC.h.
int PluginVC::main_handler | ( | int | event, | |
void * | data | |||
) |
Definition at line 105 of file PluginVC.cc.
References Action::cancel(), Debug, EVENT_IMMEDIATE, EVENT_INTERVAL, ink_assert, ink_get_hrtime(), ink_release_assert, Ptr< T >::m_ptr, VIO::mutex, Continuation::mutex, MUTEX_TAKE_TRY_LOCK, Mutex_unlock(), PLUGIN_VC_MAGIC_ALIVE, PVC_LOCK_RETRY_TIME, PVC_TYPE, Event::schedule_in(), VC_EVENT_ACTIVE_TIMEOUT, VC_EVENT_INACTIVITY_TIMEOUT, and PluginVCState::vio.
Referenced by PluginVC().
void PluginVC::reenable | ( | VIO * | vio | ) | [virtual] |
Definition at line 297 of file PluginVC.cc.
References Debug, ink_assert, ink_release_assert, VIO::mutex, VIO::op, PLUGIN_VC_MAGIC_ALIVE, PVC_TYPE, VIO::READ, this_ethread(), PluginVCState::vio, and VIO::WRITE.
void PluginVC::reenable_re | ( | VIO * | vio | ) | [virtual] |
Definition at line 318 of file PluginVC.cc.
References Debug, ink_assert, ink_release_assert, Continuation::mutex, VIO::mutex, MUTEX_TRY_LOCK, VIO::op, PLUGIN_VC_MAGIC_ALIVE, PVC_LOCK_RETRY_TIME, PVC_TYPE, VIO::READ, this_ethread(), PluginVCState::vio, and VIO::WRITE.
void PluginVC::set_active_timeout | ( | ink_hrtime | timeout_in | ) | [virtual] |
Definition at line 824 of file PluginVC.cc.
References Action::cancel(), Action::cancelled, eventProcessor, ink_assert, and EventProcessor::schedule_in().
Referenced by cancel_active_timeout().
bool PluginVC::set_data | ( | int | id, | |
void * | data | |||
) | [virtual] |
Definition at line 951 of file PluginVC.cc.
References PLUGIN_VC_ACTIVE, PLUGIN_VC_DATA_LOCAL, and PLUGIN_VC_DATA_REMOTE.
void PluginVC::set_inactivity_timeout | ( | ink_hrtime | timeout_in | ) | [virtual] |
Definition at line 842 of file PluginVC.cc.
References Action::cancel(), eventProcessor, HRTIME_SECONDS, ink_get_hrtime(), and EventProcessor::schedule_every().
Referenced by cancel_inactivity_timeout().
void PluginVC::set_local_addr | ( | ) | [virtual] |
Definition at line 890 of file PluginVC.cc.
References ats_ip_copy(), NetVConnection::local_addr, and PLUGIN_VC_ACTIVE.
void PluginVC::set_remote_addr | ( | ) | [virtual] |
Definition at line 902 of file PluginVC.cc.
References ats_ip_copy(), PLUGIN_VC_ACTIVE, and NetVConnection::remote_addr.
int PluginVC::set_tcp_init_cwnd | ( | int | init_cwnd | ) | [virtual] |
Definition at line 912 of file PluginVC.cc.
virtual void PluginVC::setPluginId | ( | int64_t | id | ) | [inline, virtual] |
Setter for plugin id.
Definition at line 127 of file PluginVC.h.
virtual void PluginVC::setPluginTag | ( | char const * | tag | ) | [inline, virtual] |
Setter for plugin tag.
Definition at line 125 of file PluginVC.h.
friend class PluginVCCore [friend] |
Definition at line 81 of file PluginVC.h.