keeps track of HappyConnOpener spare track waiting state More...

#include <HappyConnOpener.h>

Collaboration diagram for HappySpareWait:

Public Member Functions

 operator bool () const
 
void clear ()
 

Public Attributes

CodeContext::Pointer codeContext
 requestor's context More...
 
AsyncCall::Pointer callback
 a pending noteGavePrimeItsChance() or noteSpareAllowance() call More...
 
HappySpareWaitList::iterator position
 
bool toGivePrimeItsChance = false
 
bool forSpareAllowance = false
 
bool forPrimesToFail = false
 
bool forNewPeer = false
 

Detailed Description

Definition at line 36 of file HappyConnOpener.h.

Member Function Documentation

◆ clear()

void HappySpareWait::clear ( )
inline

restores default-constructed state nullifies but does not cancel the callback

Definition at line 42 of file HappyConnOpener.h.

Referenced by HappyConnOpener::cancelSpareWait(), HappyConnOpener::noteGavePrimeItsChance(), and HappyConnOpener::noteSpareAllowance().

◆ operator bool()

HappySpareWait::operator bool ( ) const
inlineexplicit

Definition at line 38 of file HappyConnOpener.h.

References forNewPeer, forPrimesToFail, forSpareAllowance, and toGivePrimeItsChance.

Member Data Documentation

◆ callback

◆ codeContext

CodeContext::Pointer HappySpareWait::codeContext

Definition at line 44 of file HappyConnOpener.h.

Referenced by HappyOrderEnforcer::enqueue().

◆ forNewPeer

bool HappySpareWait::forNewPeer = false

The current peer has no spares left to try. Prime exhaustion ends this wait (by changing currentPeer).

Definition at line 71 of file HappyConnOpener.h.

Referenced by HappyConnOpener::checkForNewConnection(), HappyConnOpener::maybeGivePrimeItsChance(), and operator bool().

◆ forPrimesToFail

bool HappySpareWait::forPrimesToFail = false

Honors zero happy_eyeballs_connect_limit. Prime exhaustion ends this wait (see ignoreSpareRestrictions).

Definition at line 67 of file HappyConnOpener.h.

Referenced by HappyConnOpener::maybeGivePrimeItsChance(), and operator bool().

◆ forSpareAllowance

bool HappySpareWait::forSpareAllowance = false

Honors happy_eyeballs_connect_gap and positive happy_eyeballs_connect_limit (one allowance per spare path). Does not start until there is a new spare path to try. Prime exhaustion ends this wait (see ignoreSpareRestrictions).

Definition at line 63 of file HappyConnOpener.h.

Referenced by HappyConnOpener::cancelSpareWait(), HappyConnOpener::maybeOpenSpareConnection(), HappyConnOpener::noteSpareAllowance(), operator bool(), and HappyConnOpener::stopWaitingForSpareAllowance().

◆ position

HappySpareWaitList::iterator HappySpareWait::position

location on the toGivePrimeItsChance or forSpareAllowance wait list invalidated when the callback is set

Definition at line 51 of file HappyConnOpener.h.

Referenced by HappyOrderEnforcer::dequeue(), and HappyOrderEnforcer::enqueue().

◆ toGivePrimeItsChance

bool HappySpareWait::toGivePrimeItsChance = false

Honoring happy_eyeballs_connect_timeout (once per currentPeer). A prime connection failure ends this wait.

Definition at line 57 of file HappyConnOpener.h.

Referenced by HappyConnOpener::cancelSpareWait(), HappyConnOpener::maybeGivePrimeItsChance(), HappyConnOpener::noteGavePrimeItsChance(), operator bool(), HappyConnOpener::stopGivingPrimeItsChance(), and HappyConnOpener::updateSpareWaitAfterPrimeFailure().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors