HappyConnOpener::CbDialer< Initiator > Class Template Reference

AsyncCall dialer for our callback. Gives us access to callback Answer. More...

#include <HappyConnOpener.h>

Inheritance diagram for HappyConnOpener::CbDialer< Initiator >:
Collaboration diagram for HappyConnOpener::CbDialer< Initiator >:

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< ErrorStateerror
 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

template<class Initiator >
typedef void(Initiator::* HappyConnOpener::CbDialer< Initiator >::Method) (Answer &)

Definition at line 113 of file HappyConnOpener.h.

Constructor & Destructor Documentation

◆ CbDialer()

template<class Initiator >
HappyConnOpener::CbDialer< Initiator >::CbDialer ( Method  method,
Initiator *  initiator 
)
inline

Definition at line 115 of file HappyConnOpener.h.

◆ ~CbDialer()

template<class Initiator >
virtual HappyConnOpener::CbDialer< Initiator >::~CbDialer ( )
virtualdefault

Member Function Documentation

◆ canDial()

template<class Initiator >
bool HappyConnOpener::CbDialer< Initiator >::canDial ( AsyncCall )
inline

◆ dial()

template<class Initiator >
void HappyConnOpener::CbDialer< Initiator >::dial ( AsyncCall )
inline

◆ print()

template<class Initiator >
virtual void HappyConnOpener::CbDialer< Initiator >::print ( std::ostream &  os) const
inlineoverridevirtual

Implements CallDialer.

Definition at line 121 of file HappyConnOpener.h.

◆ success()

bool HappyConnOpenerAnswer::success ( ) const
inlineinherited

Definition at line 78 of file HappyConnOpener.h.

References HappyConnOpenerAnswer::error.

Member Data Documentation

◆ conn

PeerConnectionPointer HappyConnOpenerAnswer::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

◆ initiator_

template<class Initiator >
CbcPointer<Initiator> HappyConnOpener::CbDialer< Initiator >::initiator_
private

Definition at line 126 of file HappyConnOpener.h.

Referenced by HappyConnOpener::CbDialer< Initiator >::canDial().

◆ method_

template<class Initiator >
Method HappyConnOpener::CbDialer< Initiator >::method_
private

Definition at line 127 of file HappyConnOpener.h.

Referenced by HappyConnOpener::CbDialer< Initiator >::dial().

◆ n_tries

int HappyConnOpenerAnswer::n_tries = 0
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

bool HappyConnOpenerAnswer::reused = false
inherited

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors