AsyncCall dialer for our callback. Gives us access to callback Answer. More...
#include <HappyConnOpener.h>


Public Types | |
typedef void(Initiator::* | Method) (Answer &) |
Public Member Functions | |
CbDialer (Method method, Initiator *initiator) | |
virtual | ~CbDialer ()=default |
bool | canDial (AsyncCall &) |
void | dial (AsyncCall &) |
virtual void | print (std::ostream &os) const override |
bool | success () const |
whether HappyConnOpener succeeded, returning a usable connection More... | |
Public Attributes | |
PeerConnectionPointer | conn |
CbcPointer< ErrorState > | error |
problem details (nil on success) More... | |
int | n_tries = 0 |
bool | reused = false |
whether conn was open earlier, by/for somebody else More... | |
Private Attributes | |
CbcPointer< Initiator > | initiator_ |
object to deliver the answer to More... | |
Method | method_ |
initiator_ method to call with the answer More... | |
Detailed Description
template<class Initiator>
class HappyConnOpener::CbDialer< Initiator >
Definition at line 110 of file HappyConnOpener.h.
Member Typedef Documentation
◆ Method
typedef void(Initiator::* HappyConnOpener::CbDialer< Initiator >::Method) (Answer &) |
Definition at line 113 of file HappyConnOpener.h.
Constructor & Destructor Documentation
◆ CbDialer()
|
inline |
Definition at line 115 of file HappyConnOpener.h.
◆ ~CbDialer()
|
virtualdefault |
Member Function Documentation
◆ canDial()
|
inline |
Definition at line 119 of file HappyConnOpener.h.
References HappyConnOpener::CbDialer< Initiator >::initiator_, and CbcPointer< Cbc >::valid().
◆ dial()
|
inline |
Definition at line 120 of file HappyConnOpener.h.
References HappyConnOpener::CbDialer< Initiator >::method_.
◆ print()
|
inlineoverridevirtual |
Implements CallDialer.
Definition at line 121 of file HappyConnOpener.h.
◆ success()
|
inlineinherited |
Definition at line 78 of file HappyConnOpener.h.
References HappyConnOpenerAnswer::error.
Member Data Documentation
◆ conn
|
inherited |
on success: an open, ready-to-use Squid-to-peer connection on failure: either a closed failed Squid-to-peer connection or nil
Definition at line 82 of file HappyConnOpener.h.
Referenced by FwdState::noteConnection(), TunnelStateData::noteConnection(), and operator<<().
◆ error
|
inherited |
Definition at line 86 of file HappyConnOpener.h.
Referenced by HappyConnOpenerAnswer::~HappyConnOpenerAnswer(), FwdState::noteConnection(), TunnelStateData::noteConnection(), operator<<(), and HappyConnOpenerAnswer::success().
◆ initiator_
|
private |
Definition at line 126 of file HappyConnOpener.h.
Referenced by HappyConnOpener::CbDialer< Initiator >::canDial().
◆ method_
|
private |
Definition at line 127 of file HappyConnOpener.h.
Referenced by HappyConnOpener::CbDialer< Initiator >::dial().
◆ n_tries
|
inherited |
The total number of attempts to establish a connection. Includes any failed attempts and [always successful] persistent connection reuse.
Definition at line 90 of file HappyConnOpener.h.
Referenced by FwdState::noteConnection(), and operator<<().
◆ reused
|
inherited |
Definition at line 93 of file HappyConnOpener.h.
Referenced by FwdState::noteConnection(), TunnelStateData::noteConnection(), and operator<<().
The documentation for this class was generated from the following file: