PeerPoolMgr.cc
Go to the documentation of this file.
31 class MyAnswerDialer: public UnaryMemFunT<PeerPoolMgr, Security::EncryptorAnswer, Security::EncryptorAnswer&>,
36 UnaryMemFunT<PeerPoolMgr, Security::EncryptorAnswer, Security::EncryptorAnswer&>(aJob, aMethod, Security::EncryptorAnswer()) {}
118 const auto connector = new Security::BlindPeerConnector(request, params.conn, callback, nullptr, timeLeft);
210 AsyncCall::Pointer callback = JobCallback(48, 5, Dialer, this, PeerPoolMgr::handleOpenedConnection);
void handleSecuredPeer(Security::EncryptorAnswer &answer)
Security::PeerConnector callback.
Definition: PeerPoolMgr.cc:136
Security::EncryptorAnswer arg1
Definition: AsyncJobCalls.h:119
Maintains an fixed-size "standby" PconnPool for a single CachePeer.
Definition: PeerPoolMgr.h:23
Definition: AsyncJob.h:32
bool tunneled
whether we spliced the connections instead of negotiating encryption
Definition: EncryptorAnswer.h:33
JobWait< Security::BlindPeerConnector > encryptionWait
waits for the established transport connection to be secured/encrypted
Definition: PeerPoolMgr.h:69
Definition: pconn.h:113
Definition: EncryptorAnswer.h:22
void handleOpenedConnection(const CommConnectCbParams ¶ms)
Comm::ConnOpener calls this when done opening a connection for us.
Definition: PeerPoolMgr.cc:89
Definition: CachePeer.h:28
Definition: ConnOpener.h:25
JobWait< Comm::ConnOpener > transportWait
waits for a transport connection to the peer to be established/opened
Definition: PeerPoolMgr.h:66
Gives Security::PeerConnector access to Answer in the PeerPoolMgr callback dialer.
Definition: PeerPoolMgr.cc:33
void(Job::* Method)(Security::EncryptorAnswer &)
Definition: AsyncJobCalls.h:110
Definition: AsyncJobCalls.h:108
void getOutgoingAddress(HttpRequest *request, const Comm::ConnectionPointer &conn)
Definition: FwdState.cc:1524
Definition: HttpRequest.h:49
MyAnswerDialer(const JobPointer &aJob, Method aMethod)
Definition: PeerPoolMgr.cc:35
bool validPeer() const
whether the peer is still out there and in a valid state we can safely use
Definition: PeerPoolMgr.cc:77
Definition: RunnersRegistry.h:38
launches PeerPoolMgrs for peers configured with standby.limit
Definition: PeerPoolMgr.cc:248
void count(int uses)
void push(const Comm::ConnectionPointer &serverConn, const char *domain)
Definition: pconn.cc:412
Callback dialer API to allow PeerConnector to set the answer.
Definition: PeerConnector.h:57
Definition: CommCalls.h:181
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:223
virtual Security::EncryptorAnswer & answer()
gives PeerConnector access to the in-dialer answer
Definition: PeerPoolMgr.cc:39
A simple PeerConnector for SSL/TLS cache_peers. No SslBump capabilities.
Definition: BlindPeerConnector.h:20
Definition: CommCalls.h:110
void start(const JobPointer &aJob, const AsyncCall::Pointer &aCallback)
starts waiting for the given job to call the given callback
Definition: JobWait.h:69
void openNewConnection()
starts the process of opening a new standby connection (if possible)
Definition: PeerPoolMgr.cc:169
RunnerRegistrationEntry(PeerPoolMgrsRr)
AsyncCall * asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:154
bool encryptTransport
whether transport encryption (TLS/SSL) is to be used on connections to the peer
Definition: PeerOptions.h:145
void pushNewConnection(const Comm::ConnectionPointer &conn)
the final step in connection opening (and, optionally, securing) sequence
Definition: PeerPoolMgr.cc:127
static void Checkpoint(const Pointer &mgr, const char *reason)
Definition: PeerPoolMgr.cc:241
void closeOldConnections(const int howMany)
closes 'howMany' standby connections
Definition: PeerPoolMgr.cc:216
void GetMarkingsToServer(HttpRequest *request, Comm::Connection &conn)
Definition: FwdState.cc:1603
#define CallJobHere1(debugSection, debugLevel, job, Class, method, arg1)
Definition: AsyncJobCalls.h:63