mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
add Binds, WhiteBinds to CConnman::Options
Part of a series of changes to clean up the instantiation of connman by decoupling the command line arguments. We also now abort with an error when explicit binds are set with -listen=0.
This commit is contained in:
@@ -145,13 +145,13 @@ public:
|
||||
uint64_t nMaxOutboundLimit = 0;
|
||||
std::vector<std::string> vSeedNodes;
|
||||
std::vector<CSubNet> vWhitelistedRange;
|
||||
std::vector<CService> vBinds, vWhiteBinds;
|
||||
};
|
||||
CConnman(uint64_t seed0, uint64_t seed1);
|
||||
~CConnman();
|
||||
bool Start(CScheduler& scheduler, std::string& strNodeError, Options options);
|
||||
bool Start(CScheduler& scheduler, Options options);
|
||||
void Stop();
|
||||
void Interrupt();
|
||||
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
|
||||
bool GetNetworkActive() const { return fNetworkActive; };
|
||||
void SetNetworkActive(bool active);
|
||||
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false, bool fAddnode = false);
|
||||
@@ -288,6 +288,9 @@ private:
|
||||
ListenSocket(SOCKET socket_, bool whitelisted_) : socket(socket_), whitelisted(whitelisted_) {}
|
||||
};
|
||||
|
||||
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
|
||||
bool Bind(const CService &addr, unsigned int flags);
|
||||
bool InitBinds(const std::vector<CService>& binds, const std::vector<CService>& whiteBinds);
|
||||
void ThreadOpenAddedConnections();
|
||||
void AddOneShot(const std::string& strDest);
|
||||
void ProcessOneShot();
|
||||
|
||||
Reference in New Issue
Block a user