ResolvedPeers.h
Go to the documentation of this file.
23 explicit ResolvedPeerPath(const Comm::ConnectionPointer &conn) : connection(conn), available(true) {}
128 PeerConnectionPointer(const Comm::ConnectionPointer &conn, const size_type pos): connection_(conn), position_(pos) {}
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
std::ostream & operator<<(std::ostream &, const ResolvedPeers &)
summarized ResolvedPeers (for debugging)
Definition: ResolvedPeers.cc:219
Definition: Connection.h:73
Definition: ResolvedPeers.h:122
Comm::ConnectionPointer connection_
half-baked, open, failed, or closed Comm::Connection (or nil)
Definition: ResolvedPeers.h:149
void finalize(const Comm::ConnectionPointer &conn)
upgrade stored peer selection details with a matching actual connection
Definition: ResolvedPeers.h:139
Comm::Connection * operator->() const
Definition: ResolvedPeers.h:132
PeerConnectionPointer(const Comm::ConnectionPointer &conn, const size_type pos)
Definition: ResolvedPeers.h:128
PeerConnectionPointer()=default
size_type position_
ResolvedPeers-maintained membership index (or npos)
Definition: ResolvedPeers.h:152
Definition: ResolvedPeers.h:21
ResolvedPeerPath(const Comm::ConnectionPointer &conn)
Definition: ResolvedPeers.h:23
bool available
whether this path may be used (i.e., has not been tried already)
Definition: ResolvedPeers.h:26
Definition: ResolvedPeers.h:34
Finding makeFinding(const Paths::iterator &found, bool foundOther)
finalizes the iterator part of the given preliminary find*() result
Definition: ResolvedPeers.cc:63
PeerConnectionPointer extractFront()
extracts and returns the first queued address
Definition: ResolvedPeers.cc:111
bool haveSpare(const Comm::Connection ¤tPeer)
whether extractSpare() would return a non-nil path right now
Definition: ResolvedPeers.cc:159
Finding findPrime(const Comm::Connection ¤tPeer)
Definition: ResolvedPeers.cc:70
Finding findSpare(const Comm::Connection ¤tPeer)
Definition: ResolvedPeers.cc:81
size_type availablePaths
the total number of currently available elements in paths_
Definition: ResolvedPeers.h:115
static int ConnectionFamily(const Comm::Connection &conn)
The protocol family of the given path, AF_INET or AF_INET6.
Definition: ResolvedPeers.cc:197
bool doneWithPrimes(const Comm::Connection ¤tPeer)
whether extractPrime() returns and will continue to return nil
Definition: ResolvedPeers.cc:185
bool doneWithPeer(const Comm::Connection ¤tPeer)
whether doneWithPrimes() and doneWithSpares() are true for currentPeer
Definition: ResolvedPeers.cc:191
void reinstatePath(const PeerConnectionPointer &)
Definition: ResolvedPeers.cc:23
PeerConnectionPointer extractFound(const char *description, const Paths::iterator &found)
convenience method to finish a successful extract*() call
Definition: ResolvedPeers.cc:141
PeerConnectionPointer extractSpare(const Comm::Connection ¤tPeer)
Definition: ResolvedPeers.cc:129
bool notificationPending
whether HappyConnOpener::noteCandidatesChange() is scheduled to fire
Definition: ResolvedPeers.h:85
bool destinationsFinalized
whether all of the available candidate paths received from DNS
Definition: ResolvedPeers.h:82
void addPath(const Comm::ConnectionPointer &)
add a candidate path to try after all the existing paths
Definition: ResolvedPeers.cc:46
Finding findPeer(const Comm::Connection ¤tPeer)
Definition: ResolvedPeers.cc:102
PeerConnectionPointer extractPrime(const Comm::Connection ¤tPeer)
Definition: ResolvedPeers.cc:118
bool doneWithSpares(const Comm::Connection ¤tPeer)
whether extractSpare() returns and will continue to return nil
Definition: ResolvedPeers.cc:179