Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | void Init(const Options &connOptions) { | ||||
} | } | ||||
} | } | ||||
CConnman(const Config &configIn, uint64_t seed0, uint64_t seed1); | CConnman(const Config &configIn, uint64_t seed0, uint64_t seed1); | ||||
~CConnman(); | ~CConnman(); | ||||
bool Start(CScheduler &scheduler, const Options &options); | bool Start(CScheduler &scheduler, const Options &options); | ||||
// TODO: Remove NO_THREAD_SAFETY_ANALYSIS. Lock cs_vNodes before reading the | void StopThreads(); | ||||
// variable vNodes. | void StopNodes(); | ||||
// | void Stop() { | ||||
// When removing NO_THREAD_SAFETY_ANALYSIS be aware of the following lock | StopThreads(); | ||||
// order requirements: | StopNodes(); | ||||
// * CheckForStaleTipAndEvictPeers locks cs_main before indirectly calling | }; | ||||
// GetExtraOutboundCount which locks cs_vNodes. | |||||
// * ProcessMessage locks cs_main and g_cs_orphans before indirectly calling | |||||
// ForEachNode which locks cs_vNodes. | |||||
// | |||||
// Thus the implicit locking order requirement is: (1) cs_main, (2) | |||||
// g_cs_orphans, (3) cs_vNodes. | |||||
void Stop() NO_THREAD_SAFETY_ANALYSIS; | |||||
void Interrupt(); | void Interrupt(); | ||||
bool GetNetworkActive() const { return fNetworkActive; }; | bool GetNetworkActive() const { return fNetworkActive; }; | ||||
bool GetUseAddrmanOutgoing() const { return m_use_addrman_outgoing; }; | bool GetUseAddrmanOutgoing() const { return m_use_addrman_outgoing; }; | ||||
void SetNetworkActive(bool active); | void SetNetworkActive(bool active); | ||||
void OpenNetworkConnection(const CAddress &addrConnect, bool fCountFailure, | void OpenNetworkConnection(const CAddress &addrConnect, bool fCountFailure, | ||||
CSemaphoreGrant *grantOutbound = nullptr, | CSemaphoreGrant *grantOutbound = nullptr, | ||||
const char *strDest = nullptr, | const char *strDest = nullptr, | ||||
▲ Show 20 Lines • Show All 852 Lines • Show Last 20 Lines |